diff --git a/Example/Program.cs b/Example/Program.cs index d1f25694..91477fbc 100644 --- a/Example/Program.cs +++ b/Example/Program.cs @@ -111,7 +111,7 @@ namespace Example { }; #if DEBUG - ws.Log.Level = LogLevel.TRACE; + ws.Log.Level = LogLevel.Trace; #endif //ws.Compression = CompressionMethod.DEFLATE; //ws.Origin = "http://echo.websocket.org"; diff --git a/Example1/AudioStreamer.cs b/Example1/AudioStreamer.cs index d2849b5b..5b7aa951 100644 --- a/Example1/AudioStreamer.cs +++ b/Example1/AudioStreamer.cs @@ -73,7 +73,7 @@ namespace Example1 private void configure() { #if DEBUG - _ws.Log.Level = LogLevel.TRACE; + _ws.Log.Level = LogLevel.Trace; #endif _ws.OnOpen += (sender, e) => { diff --git a/Example2/Program.cs b/Example2/Program.cs index 686701c4..0f74dcd3 100644 --- a/Example2/Program.cs +++ b/Example2/Program.cs @@ -17,7 +17,7 @@ namespace Example2 //var wssv = new WebSocketServer ("wss://localhost:4649"); // Secure #if DEBUG - wssv.Log.Level = LogLevel.TRACE; + wssv.Log.Level = LogLevel.Trace; #endif /* Secure Connection diff --git a/Example3/Program.cs b/Example3/Program.cs index 78133dd9..fce6ed2d 100644 --- a/Example3/Program.cs +++ b/Example3/Program.cs @@ -17,7 +17,7 @@ namespace Example3 //_httpsv = new HttpServer (4649, true) // Secure; #if DEBUG - _httpsv.Log.Level = LogLevel.TRACE; + _httpsv.Log.Level = LogLevel.Trace; #endif /* Secure Connection diff --git a/README.md b/README.md index eebdcdae..7a333e6f 100644 --- a/README.md +++ b/README.md @@ -468,15 +468,15 @@ The `WebSocket` class includes the own logging function. You can access it with the `WebSocket.Log` property (returns a `WebSocketSharp.Logger`). -So if you would like to change the current logging level (`WebSocketSharp.LogLevel.ERROR` as the default), you should set the `WebSocket.Log.Level` property to any of the `LogLevel` enum values. +So if you would like to change the current logging level (`WebSocketSharp.LogLevel.Error` as the default), you should set the `WebSocket.Log.Level` property to any of the `LogLevel` enum values. ```cs -ws.Log.Level = LogLevel.DEBUG; +ws.Log.Level = LogLevel.Debug; ``` -This means a log with less than `LogLevel.DEBUG` cannot be outputted. +This means a log with less than `LogLevel.Debug` cannot be outputted. -And if you would like to output a log, you should use any of the output methods. The following outputs a log with `LogLevel.DEBUG`. +And if you would like to output a log, you should use any of the output methods. The following outputs a log with `LogLevel.Debug`. ```cs ws.Log.Debug ("This is a debug message."); diff --git a/websocket-sharp/LogLevel.cs b/websocket-sharp/LogLevel.cs index b6001f08..487d3311 100644 --- a/websocket-sharp/LogLevel.cs +++ b/websocket-sharp/LogLevel.cs @@ -4,8 +4,8 @@ * * The MIT License * - * Copyright (c) 2013 sta.blockhead - * + * Copyright (c) 2013-2014 sta.blockhead + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights @@ -15,7 +15,7 @@ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -31,33 +31,33 @@ using System; namespace WebSocketSharp { /// - /// Contains the values of the logging level. + /// Contains the values of the logging levels. /// public enum LogLevel { /// /// Indicates the bottom logging level. /// - TRACE, + Trace, /// /// Indicates the 2nd logging level from the bottom. /// - DEBUG, + Debug, /// /// Indicates the 3rd logging level from the bottom. /// - INFO, + Info, /// /// Indicates the 3rd logging level from the top. /// - WARN, + Warn, /// /// Indicates the 2nd logging level from the top. /// - ERROR, + Error, /// /// Indicates the top logging level. /// - FATAL + Fatal } } diff --git a/websocket-sharp/Logger.cs b/websocket-sharp/Logger.cs index 00fbb79b..50ede317 100644 --- a/websocket-sharp/Logger.cs +++ b/websocket-sharp/Logger.cs @@ -68,11 +68,11 @@ namespace WebSocketSharp /// Initializes a new instance of the class. /// /// - /// This constructor initializes the current logging level with the and + /// This constructor initializes the current logging level with the and /// initializes the path to the log file with . /// public Logger () - : this (LogLevel.ERROR, null, null) + : this (LogLevel.Error, null, null) { } @@ -184,7 +184,7 @@ namespace WebSocketSharp _output (data, _file); } catch (Exception ex) { - data = new LogData (LogLevel.FATAL, new StackFrame (0, true), ex.Message); + data = new LogData (LogLevel.Fatal, new StackFrame (0, true), ex.Message); Console.WriteLine (data.ToString ()); } } @@ -204,10 +204,10 @@ namespace WebSocketSharp #region Public Methods /// - /// Outputs the specified as a log with the . + /// Outputs the specified as a log with the . /// /// - /// If the current logging level is greater than the , + /// If the current logging level is greater than the , /// this method does not output as a log. /// /// @@ -215,14 +215,14 @@ namespace WebSocketSharp /// public void Debug (string message) { - output (message, LogLevel.DEBUG); + output (message, LogLevel.Debug); } /// - /// Outputs the specified as a log with the . + /// Outputs the specified as a log with the . /// /// - /// If the current logging level is greater than the , + /// If the current logging level is greater than the , /// this method does not output as a log. /// /// @@ -230,14 +230,14 @@ namespace WebSocketSharp /// public void Error (string message) { - output (message, LogLevel.ERROR); + output (message, LogLevel.Error); } /// - /// Outputs the specified as a log with the . + /// Outputs the specified as a log with the . /// /// - /// If the current logging level is greater than the , + /// If the current logging level is greater than the , /// this method does not output as a log. /// /// @@ -245,14 +245,14 @@ namespace WebSocketSharp /// public void Fatal (string message) { - output (message, LogLevel.FATAL); + output (message, LogLevel.Fatal); } /// - /// Outputs the specified as a log with the . + /// Outputs the specified as a log with the . /// /// - /// If the current logging level is greater than the , + /// If the current logging level is greater than the , /// this method does not output as a log. /// /// @@ -260,7 +260,7 @@ namespace WebSocketSharp /// public void Info (string message) { - output (message, LogLevel.INFO); + output (message, LogLevel.Info); } /// @@ -285,10 +285,10 @@ namespace WebSocketSharp } /// - /// Outputs the specified as a log with the . + /// Outputs the specified as a log with the . /// /// - /// If the current logging level is greater than the , + /// If the current logging level is greater than the , /// this method does not output as a log. /// /// @@ -296,14 +296,14 @@ namespace WebSocketSharp /// public void Trace (string message) { - output (message, LogLevel.TRACE); + output (message, LogLevel.Trace); } /// - /// Outputs the specified as a log with the . + /// Outputs the specified as a log with the . /// /// - /// If the current logging level is greater than the , + /// If the current logging level is greater than the , /// this method does not output as a log. /// /// @@ -311,7 +311,7 @@ namespace WebSocketSharp /// public void Warn (string message) { - output (message, LogLevel.WARN); + output (message, LogLevel.Warn); } #endregion diff --git a/websocket-sharp/Server/HttpServer.cs b/websocket-sharp/Server/HttpServer.cs index 7af6d80c..a3886539 100644 --- a/websocket-sharp/Server/HttpServer.cs +++ b/websocket-sharp/Server/HttpServer.cs @@ -246,7 +246,7 @@ namespace WebSocketSharp.Server /// Gets the logging functions. /// /// - /// The default logging level is . If you would like to change it, + /// The default logging level is . If you would like to change it, /// you should set the Log.Level property to any of the enum /// values. /// diff --git a/websocket-sharp/Server/WebSocketServer.cs b/websocket-sharp/Server/WebSocketServer.cs index 3c7e7819..0f69ee98 100644 --- a/websocket-sharp/Server/WebSocketServer.cs +++ b/websocket-sharp/Server/WebSocketServer.cs @@ -372,7 +372,7 @@ namespace WebSocketSharp.Server /// Gets the logging functions. /// /// - /// The default logging level is . If you would like to change it, + /// The default logging level is . If you would like to change it, /// you should set the Log.Level property to any of the enum /// values. /// diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs index ead0ea07..75acd34b 100644 --- a/websocket-sharp/WebSocket.cs +++ b/websocket-sharp/WebSocket.cs @@ -310,7 +310,7 @@ namespace WebSocketSharp /// Gets the logging functions. /// /// - /// The default logging level is . If you would like to change it, + /// The default logging level is . If you would like to change it, /// you should set the Log.Level property to any of the enum /// values. ///