本文整理汇总了C#中DebugLevel类的典型用法代码示例。如果您正苦于以下问题:C# DebugLevel类的具体用法?C# DebugLevel怎么用?C# DebugLevel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DebugLevel类属于命名空间,在下文中一共展示了DebugLevel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1:
void IPhotonPeerListener.DebugReturn(DebugLevel debugLevel, string debug)
{
if (log.IsDebugEnabled)
{
// we do not use debugLevel here - just log whatever debug we have
log.DebugFormat(debug);
}
}
开发者ID:JerryBian,项目名称:PhotonSample,代码行数:8,代码来源:WorldForm.cs
示例2: Log
private static void Log(DebugLevel priority, string tag, string msg)
{
var logger = AxolotlLoggerProvider.GetProvider();
if (logger != null) {
logger.Log(priority, tag, msg);
}
}
开发者ID:Muraad,项目名称:libaxolotl-net,代码行数:8,代码来源:Logger.cs
示例3: LogStringWithTimeStamp
public void LogStringWithTimeStamp(string str, DebugLevel debugLevel)
{
StreamWriter stream = StreamSelector (debugLevel);
if (stream != null) {
stream.WriteLine ("{0} : [{1}] {2}", TimeStamp(), debugLevel.ToString(), str);
stream.Flush ();
}
}
开发者ID:jannickj,项目名称:multipacman,代码行数:8,代码来源:Logger.cs
示例4: LogStringWithPrefix
public void LogStringWithPrefix(string str, string prefix, DebugLevel debugLevel)
{
StreamWriter stream = StreamSelector (debugLevel);
if (stream != null) {
stream.WriteLine ("{0}{1}", prefix, str);
stream.Flush ();
}
}
开发者ID:jannickj,项目名称:JSLibrary,代码行数:8,代码来源:Logger.cs
示例5: Factory
/// <summary>
/// Default Constructor for a <see cref = "SharpDX.Direct2D1.Factory" />.
/// </summary>
public Factory(FactoryType factoryType, DebugLevel debugLevel)
: base(IntPtr.Zero)
{
FactoryOptions? options = null;
if (debugLevel != DebugLevel.None)
options = new FactoryOptions() { DebugLevel = debugLevel };
IntPtr temp;
D2D1.CreateFactory(factoryType, Utilities.GetGuidFromType(GetType()), options, out temp);
FromTemp(temp);
}
开发者ID:alexey-bez,项目名称:SharpDX,代码行数:15,代码来源:Factory.cs
示例6: ToFile
public static void ToFile(DebugLevel level, string message)
{
//Directory.CreateDirectory("Logs");
//StreamWriter file = new StreamWriter(
// LOGFILE,
// File.Exists(LOGFILE));
//file.WriteLine("[" + DateTime.Now.ToString() + "] " +
// level.ToString() + ": " + message + "\n");
//file.Close();
}
开发者ID:NoMore201,项目名称:InteractiveMediaWindow,代码行数:12,代码来源:DataLog.cs
示例7: Debug_DebugHandler
private void Debug_DebugHandler(string arg1, DebugLevel arg2)
{
switch (arg2)
{
case DebugLevel.Info:
UnityEngine.Debug.Log(arg1);
break;
case DebugLevel.Warning:
UnityEngine.Debug.LogWarning(arg1);
break;
case DebugLevel.Error:
UnityEngine.Debug.LogError(arg1);
break;
}
}
开发者ID:tyrant39001,项目名称:Tyrant,代码行数:15,代码来源:DesignerDataLoader.cs
示例8: Debug_DebugHandler
private static void Debug_DebugHandler(string arg1, DebugLevel arg2)
{
var consoleForegroundColorCashe = Console.ForegroundColor;
switch (arg2)
{
case DebugLevel.Info:
Console.ForegroundColor = ConsoleColor.White;
break;
case DebugLevel.Warning:
Console.ForegroundColor = ConsoleColor.Yellow;
break;
case DebugLevel.Error:
Console.ForegroundColor = ConsoleColor.Red;
break;
}
Console.WriteLine(arg1);
Console.ForegroundColor = consoleForegroundColorCashe;
}
开发者ID:tyrant39001,项目名称:Tyrant,代码行数:18,代码来源:Program.cs
示例9: Debug
//string Prefix = ""
//public static void Debug(string content, DebugLevel level = DebugLevel.Info,
// Output way = Output.Console, MenuItem DebugMenu = null)
//{
// if (DebugMenu != null && !DebugMenu.GetValue<bool>()) return;
// if (way == Output.Console)
// {
// ConsoleColor color = ConsoleColor.White;
// if (level == DebugLevel.Info)
// {
// color = ConsoleColor.Green;
// }
// else if (level == DebugLevel.Warning)
// {
// color = ConsoleColor.Yellow;
// }
// else if (level == DebugLevel.Wrang)
// {
// color = ConsoleColor.Red;
// }
// Console.ForegroundColor = color;
// Console.WriteLine(content);
// Console.ForegroundColor = ConsoleColor.White;
// }
// else if(way == Output.ChatBox)
// {
// System.Drawing.Color color = System.Drawing.Color.White;
// if (level == DebugLevel.Info)
// {
// color = System.Drawing.ColorTranslator.FromHtml("#AAAAFF");
// }
// else if (level == DebugLevel.Warning)
// {
// color = System.Drawing.Color.Orange;
// }
// else if (level == DebugLevel.Wrang)
// {
// color = System.Drawing.Color.Red;
// }
// Game.PrintChat(content.ToHtml(color, FontStlye.Cite));
// }
//}
public static void Debug(string content, DebugLevel level = DebugLevel.Info,
Output way = Output.Console, bool enable = true)
{
if (!enable) return;
if (way == Output.Console)
{
ConsoleColor color = ConsoleColor.White;
if (level == DebugLevel.Info)
{
color = ConsoleColor.Green;
}
else if (level == DebugLevel.Warning)
{
color = ConsoleColor.Yellow;
}
else if (level == DebugLevel.Wrang)
{
color = ConsoleColor.Red;
}
Console.ForegroundColor = color;
Console.WriteLine(content);
Console.ForegroundColor = ConsoleColor.White;
}
else if (way == Output.ChatBox)
{
System.Drawing.Color color = System.Drawing.Color.White;
if (level == DebugLevel.Info)
{
color = System.Drawing.ColorTranslator.FromHtml("#AAAAFF");
}
else if (level == DebugLevel.Warning)
{
color = System.Drawing.Color.Orange;
}
else if (level == DebugLevel.Wrang)
{
color = System.Drawing.Color.Red;
}
Game.PrintChat(content.ToHtml(color, FontStlye.Cite));
}
}
开发者ID:CjShu,项目名称:LeagueSharp,代码行数:85,代码来源:DeBug.cs
示例10: Write
public static void Write(string Prefix, string content, DebugLevel level = DebugLevel.Info,
WriteWay way = WriteWay.Console, bool enable = true)
{
if (!enable) return;
if (way == WriteWay.Console)
{
ConsoleColor color = ConsoleColor.White;
if (level == DebugLevel.Info)
{
color = ConsoleColor.DarkGreen;
}
else if (level == DebugLevel.Warning)
{
color = ConsoleColor.Yellow;
}
else if (level == DebugLevel.Wrang)
{
color = ConsoleColor.Red;
}
Console.ForegroundColor = color;
Console.WriteLine(!string.IsNullOrEmpty(Prefix) ? (Prefix + ":"+ content) : "" + content);
Console.ForegroundColor = ConsoleColor.White;
}
else
{
System.Drawing.Color color = System.Drawing.Color.White;
if (level == DebugLevel.Info)
{
color = System.Drawing.ColorTranslator.FromHtml("#AAAAFF");
}
else if (level == DebugLevel.Warning)
{
color = System.Drawing.Color.Orange;
}
else if (level == DebugLevel.Wrang)
{
color = System.Drawing.Color.Red;
}
content = (string.IsNullOrEmpty(Prefix) ? (Prefix + ":") : "") + content;
Game.PrintChat(content.ToHtml(color, FontStlye.Cite));
}
}
开发者ID:VivianGit,项目名称:LeagueSharp,代码行数:43,代码来源:DeBug.cs
示例11: DebugReturn
public void DebugReturn(DebugLevel level, string message)
{
if (level == DebugLevel.ERROR)
{
Debug.LogError(message);
}
else if (level == DebugLevel.WARNING)
{
Debug.LogWarning(message);
}
else if (level == DebugLevel.INFO && PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
{
Debug.Log(message);
}
else if (level == DebugLevel.ALL && PhotonNetwork.logLevel == PhotonLogLevel.Full)
{
Debug.Log(message);
}
}
开发者ID:frizac-b,项目名称:gladiawar,代码行数:19,代码来源:PhotonHandler.cs
示例12: Debug
public static void Debug(string content, DebugLevel level = DebugLevel.Info, Output way = Output.Console) {
if (way == Output.Console)
{
ConsoleColor color = ConsoleColor.White;
if (level == DebugLevel.Info)
{
color = ConsoleColor.Green;
}
else if (level == DebugLevel.Warning)
{
color = ConsoleColor.Yellow;
}
else if (level == DebugLevel.Wrang)
{
color = ConsoleColor.Red;
}
Console.ForegroundColor = color;
Console.WriteLine("AS锤石:" + content);
Console.ForegroundColor = ConsoleColor.White;
}
else if(Thresh.Config.Item("调试").GetValue<bool>())
{
System.Drawing.Color color = System.Drawing.Color.White;
if (level == DebugLevel.Info)
{
color = System.Drawing.ColorTranslator.FromHtml("#AAAAFF");
}
else if (level == DebugLevel.Warning)
{
color = System.Drawing.Color.Orange;
}
else if (level == DebugLevel.Wrang)
{
color = System.Drawing.Color.Red;
}
}
}
开发者ID:CjShu,项目名称:LeagueSharp,代码行数:37,代码来源:Utill.cs
示例13: DialVoice
public string DialVoice(string number, bool showNumber, int gammuRcSection, DebugLevel debugLevel)
{
if (number == null) throw new ArgumentNullException("number");
try{
//_sm.DialVoice(number);
var con = _sm.Contacts;
}
catch (GammuException ex)
{
throw new FaultException<GammuErrInfo> (new GammuErrInfo
{
ErrorCode = ex.ErrorCode,
Message = ex.Text
});
}
return string.Format("Dial number {0}With result ", number) ;
}
开发者ID:Joe32,项目名称:PhoneControl,代码行数:24,代码来源:PhoneControlService.cs
示例14: DebugReturn
public void DebugReturn(DebugLevel level, string message)
{
this.externalListener.DebugReturn(level, message);
}
开发者ID:JonasSkaug,项目名称:afgangsprojekt-team-tj,代码行数:4,代码来源:NetworkingPeer.cs
示例15: DebugReturn
public void DebugReturn(DebugLevel level, string message)
{
Debug.Log(message);
}
开发者ID:Kaljo123,项目名称:Teleport,代码行数:4,代码来源:ChatGui.cs
示例16: DebugReturn
/// <summary>
/// The debug return.
/// </summary>
/// <param name = "logLevel">
/// The log Level.
/// </param>
/// <param name = "message">
/// The message.
/// </param>
public void DebugReturn(DebugLevel logLevel, string message)
{
switch (logLevel)
{
case DebugLevel.ALL:
{
if (log.IsDebugEnabled)
{
log.Debug(message);
}
break;
}
case DebugLevel.INFO:
{
if (log.IsInfoEnabled)
{
log.Info(message);
}
break;
}
case DebugLevel.ERROR:
{
if (log.IsErrorEnabled)
{
log.Error(message);
}
break;
}
case DebugLevel.WARNING:
{
if (log.IsWarnEnabled)
{
log.Warn(message);
}
break;
}
}
}
开发者ID:ommziSolution,项目名称:PhotonServer,代码行数:54,代码来源:PeerListener.cs
示例17:
void IPhotonPeerListener.DebugReturn(DebugLevel level, string message)
{
this.listener.DebugReturn(level, message);
}
开发者ID:jdohgamer,项目名称:SSC,代码行数:4,代码来源:ChatClient.cs
示例18: Inform
public static void Inform (DebugLevel level, String info)
{
if (level <= debug) {
Console.Error.WriteLine (info);
}
}
开发者ID:B-Rich,项目名称:doap,代码行数:6,代码来源:Util.cs
示例19: DebugReturn
/// <summary>
/// The debug return.
/// </summary>
/// <param name = "debugLevel">
/// The debug Level.
/// </param>
/// <param name = "debug">
/// The debug message.
/// </param>
public void DebugReturn(DebugLevel debugLevel, string debug)
{
switch (debugLevel)
{
case DebugLevel.ALL:
if (log.IsDebugEnabled)
{
log.Debug("DebugReturn: " + debug);
}
break;
case DebugLevel.INFO:
log.Info("DebugReturn(INFO): " + debug);
break;
case DebugLevel.WARNING:
log.Warn("DebugReturn(WARN): " + debug);
break;
case DebugLevel.ERROR:
log.Error("DebugReturn(ERROR): " + debug);
break;
}
}
开发者ID:JerryBian,项目名称:PhotonSample,代码行数:34,代码来源:TestClient.cs
示例20: WriteChatBox
public static void WriteChatBox(string content, DebugLevel level = DebugLevel.Info, bool enable = true)
{
Write(null, content, level, WriteWay.ChatBox, enable);
}
开发者ID:VivianGit,项目名称:LeagueSharp,代码行数:4,代码来源:DeBug.cs
注:本文中的DebugLevel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论