-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathLogging.cs
More file actions
42 lines (36 loc) · 1.12 KB
/
Copy pathLogging.cs
File metadata and controls
42 lines (36 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
namespace BinaryNinja
{
public static partial class Core
{
/// <summary>Routes messages at or above the given level to standard output.</summary>
public static void LogToStdout(LogLevel minimumLevel)
{
NativeMethods.BNLogToStdout(minimumLevel);
}
/// <summary>Routes messages at or above the given level to standard error.</summary>
public static void LogToStderr(LogLevel minimumLevel)
{
NativeMethods.BNLogToStderr(minimumLevel);
}
/// <summary>Routes messages at or above the given level to a file.</summary>
public static bool LogToFile(LogLevel minimumLevel, string path, bool append = false)
{
if (null == path)
{
throw new ArgumentNullException(nameof(path));
}
return NativeMethods.BNLogToFile(minimumLevel, path, append);
}
/// <summary>Notifies registered listeners that their configuration may have changed.</summary>
public static void UpdateLogListeners()
{
NativeMethods.BNUpdateLogListeners();
}
/// <summary>Flushes and closes every core-managed log destination.</summary>
public static void CloseLogs()
{
NativeMethods.BNCloseLogs();
}
}
}