Skip to content

Commit

Permalink
fix default logleve in release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriktsarpalis committed May 21, 2016
1 parent 16b0a22 commit b097a93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/MBrace.AWS/Runtime/Service.fs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type WorkerService (config : Configuration, workerId : string) =
let mutable status = 0 // 0: stopped, 1: starting, 2: running, 3: stopping
let mutable subscription = None : WorkerSubscription.Subscription option
let mutable cancellationTokenSource = None : CancellationTokenSource option
let attacheableLogger = AttacheableLogger.Create(makeAsynchronous = true)
let attacheableLogger = AttacheableLogger.Create(makeAsynchronous = true, logLevel = LogLevel.Info)

let trySetStarting () = Interlocked.CompareExchange(&status, 1, 0) = 0
let trySetStopping () = Interlocked.CompareExchange(&status, 3, 2) = 2
Expand Down
4 changes: 4 additions & 0 deletions src/MBrace.AWS/Runtime/StandaloneWorker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ module StandaloneWorker =
| Some n -> n

let svc = new WorkerService(config, workerId)

#if DEBUG
svc.LogLevel <- LogLevel.Info
#endif
if not cli.Quiet then
ignore <| svc.AttachLogger(ConsoleLogger(showDate = true, useColors = true))

Expand Down

0 comments on commit b097a93

Please sign in to comment.