File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Wox.Infrastructure/Logger Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,20 @@ public static class Log
11
11
{
12
12
public const string DirectoryName = "Logs" ;
13
13
14
+ public static string CurrentLogDirectory { get ; private set ; }
15
+
14
16
static Log ( )
15
17
{
16
- var path = Path . Combine ( Constant . DataDirectory , DirectoryName , Constant . Version ) ;
17
- if ( ! Directory . Exists ( path ) )
18
+ CurrentLogDirectory = Path . Combine ( Constant . DataDirectory , DirectoryName , Constant . Version ) ;
19
+ if ( ! Directory . Exists ( CurrentLogDirectory ) )
18
20
{
19
- Directory . CreateDirectory ( path ) ;
21
+ Directory . CreateDirectory ( CurrentLogDirectory ) ;
20
22
}
21
23
22
24
var configuration = new LoggingConfiguration ( ) ;
23
25
var target = new FileTarget ( ) ;
24
26
configuration . AddTarget ( "file" , target ) ;
25
- target . FileName = path . Replace ( @"\" , "/" ) + "/${shortdate}.txt" ;
27
+ target . FileName = CurrentLogDirectory . Replace ( @"\" , "/" ) + "/${shortdate}.txt" ;
26
28
#if DEBUG
27
29
var rule = new LoggingRule ( "*" , LogLevel . Debug , target ) ;
28
30
#else
You can’t perform that action at this time.
0 commit comments