Skip to content

Commit b7c1c56

Browse files
committed
Disable logging by default for perf
See discussion in #3
1 parent 0e64843 commit b7c1c56

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sshfs/SSHFS.CLI/Program.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ class Options
5555
Required = false,
5656
HelpText = "Path to SSH user's private key(s), if key-based auth should be attempted")]
5757
public IEnumerable<string> Keys { get; set; }
58+
59+
// Logging
60+
[Option('v', "verbose",
61+
Required = false, Default = false,
62+
HelpText = "Enable Dokan logging from mounted filesystem")]
63+
public bool Logging { get; set; }
5864
}
5965

6066
class Program
@@ -77,7 +83,7 @@ static void Start(Options options)
7783
throw new InvalidOperationException(
7884
"Could not connect to server with any known authentication mechanism");
7985

80-
fs.Mount($"{options.DriveLetter}");
86+
fs.Mount($"{options.DriveLetter}", options.Logging ? null : new NullLogger());
8187
}
8288

8389
static IEnumerable<(string, ConnectionInfo)> GetAuthMechanisms(Options options)

0 commit comments

Comments
 (0)