Skip to content

Commit 710a239

Browse files
author
Eirik Tsarpalis
committed
change loglevel cli format
1 parent f4f4037 commit 710a239

File tree

9 files changed

+35
-30
lines changed

9 files changed

+35
-30
lines changed

RELEASE_NOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 1.5.4
2+
* Changes in default loglevel.
3+
14
### 1.5.3
25
* Changes in loglevels.
36

src/MBrace.Azure.Management/AssemblyInfo.fs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ open System.Reflection
66
[<assembly: AssemblyCompanyAttribute("@mbraceproject")>]
77
[<assembly: AssemblyCopyrightAttribute("© Nessos Information Technologies and other contributors.")>]
88
[<assembly: AssemblyTrademarkAttribute("MBrace")>]
9-
[<assembly: AssemblyMetadataAttribute("Release Signature","Version 1.5.3, Git Hash 08b0ac, Build Date 31102017 03:54 -04:00")>]
10-
[<assembly: AssemblyVersionAttribute("1.5.3")>]
11-
[<assembly: AssemblyFileVersionAttribute("1.5.3")>]
9+
[<assembly: AssemblyMetadataAttribute("Release Signature","Version 1.5.4, Git Hash f4f403, Build Date 31102017 11:36 -04:00")>]
10+
[<assembly: AssemblyVersionAttribute("1.5.4")>]
11+
[<assembly: AssemblyFileVersionAttribute("1.5.4")>]
1212
do ()
1313

1414
module internal AssemblyVersionInformation =
1515
let [<Literal>] AssemblyProduct = "MBrace.Azure"
1616
let [<Literal>] AssemblyCompany = "@mbraceproject"
1717
let [<Literal>] AssemblyCopyright = "© Nessos Information Technologies and other contributors."
1818
let [<Literal>] AssemblyTrademark = "MBrace"
19-
let [<Literal>] AssemblyMetadata_Release_Signature = "Version 1.5.3, Git Hash 08b0ac, Build Date 31102017 03:54 -04:00"
20-
let [<Literal>] AssemblyVersion = "1.5.3"
21-
let [<Literal>] AssemblyFileVersion = "1.5.3"
19+
let [<Literal>] AssemblyMetadata_Release_Signature = "Version 1.5.4, Git Hash f4f403, Build Date 31102017 11:36 -04:00"
20+
let [<Literal>] AssemblyVersion = "1.5.4"
21+
let [<Literal>] AssemblyFileVersion = "1.5.4"
2222

23-
let [<Literal>] ReleaseTag = "1.5.3"
23+
let [<Literal>] ReleaseTag = "1.5.4"

src/MBrace.Azure.StandaloneWorker/App.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<add key="heartbeat threshold" value="300" />
1616
<!-- Specify the working directory for the worker. : string -->
1717
<!--<add key="working directory" value="enter a local working directory" />-->
18-
<!-- Log level for worker system logs. Critical = 1, Error = 2, Warning = 3, Info = 4, Debug = 5. Defaults to Info. : int -->
19-
<add key="log level" value="4" />
18+
<!-- Log level for worker system logs. Critical, Error, Warning, Info, Debug. Defaults to Info. -->
19+
<add key="log level" value="info" />
2020
<!-- Specify a log file to write worker system logs. : string -->
2121
<add key="log file" value="logs.txt" />
2222
</appSettings>

src/MBrace.Azure.StandaloneWorker/AssemblyInfo.fs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ open System.Reflection
66
[<assembly: AssemblyCompanyAttribute("@mbraceproject")>]
77
[<assembly: AssemblyCopyrightAttribute("© Nessos Information Technologies and other contributors.")>]
88
[<assembly: AssemblyTrademarkAttribute("MBrace")>]
9-
[<assembly: AssemblyMetadataAttribute("Release Signature","Version 1.5.3, Git Hash 08b0ac, Build Date 31102017 03:54 -04:00")>]
10-
[<assembly: AssemblyVersionAttribute("1.5.3")>]
11-
[<assembly: AssemblyFileVersionAttribute("1.5.3")>]
9+
[<assembly: AssemblyMetadataAttribute("Release Signature","Version 1.5.4, Git Hash f4f403, Build Date 31102017 11:36 -04:00")>]
10+
[<assembly: AssemblyVersionAttribute("1.5.4")>]
11+
[<assembly: AssemblyFileVersionAttribute("1.5.4")>]
1212
do ()
1313

1414
module internal AssemblyVersionInformation =
1515
let [<Literal>] AssemblyProduct = "MBrace.Azure"
1616
let [<Literal>] AssemblyCompany = "@mbraceproject"
1717
let [<Literal>] AssemblyCopyright = "© Nessos Information Technologies and other contributors."
1818
let [<Literal>] AssemblyTrademark = "MBrace"
19-
let [<Literal>] AssemblyMetadata_Release_Signature = "Version 1.5.3, Git Hash 08b0ac, Build Date 31102017 03:54 -04:00"
20-
let [<Literal>] AssemblyVersion = "1.5.3"
21-
let [<Literal>] AssemblyFileVersion = "1.5.3"
19+
let [<Literal>] AssemblyMetadata_Release_Signature = "Version 1.5.4, Git Hash f4f403, Build Date 31102017 11:36 -04:00"
20+
let [<Literal>] AssemblyVersion = "1.5.4"
21+
let [<Literal>] AssemblyFileVersion = "1.5.4"
2222

23-
let [<Literal>] ReleaseTag = "1.5.3"
23+
let [<Literal>] ReleaseTag = "1.5.4"

src/MBrace.Azure.StandaloneWorker/MBrace.Azure.StandaloneWorker.fsproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
<PlatformTarget>AnyCPU</PlatformTarget>
2929
<DocumentationFile>..\..\bin\mbrace.azureworker.XML</DocumentationFile>
3030
<Prefer32Bit>false</Prefer32Bit>
31+
<StartArguments>
32+
</StartArguments>
3133
</PropertyGroup>
3234
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3335
<DebugType>pdbonly</DebugType>

src/MBrace.Azure/AssemblyInfo.fs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ open System.Reflection
66
[<assembly: AssemblyCompanyAttribute("@mbraceproject")>]
77
[<assembly: AssemblyCopyrightAttribute("© Nessos Information Technologies and other contributors.")>]
88
[<assembly: AssemblyTrademarkAttribute("MBrace")>]
9-
[<assembly: AssemblyMetadataAttribute("Release Signature","Version 1.5.3, Git Hash 08b0ac, Build Date 31102017 03:54 -04:00")>]
10-
[<assembly: AssemblyVersionAttribute("1.5.3")>]
11-
[<assembly: AssemblyFileVersionAttribute("1.5.3")>]
9+
[<assembly: AssemblyMetadataAttribute("Release Signature","Version 1.5.4, Git Hash f4f403, Build Date 31102017 11:36 -04:00")>]
10+
[<assembly: AssemblyVersionAttribute("1.5.4")>]
11+
[<assembly: AssemblyFileVersionAttribute("1.5.4")>]
1212
do ()
1313

1414
module internal AssemblyVersionInformation =
1515
let [<Literal>] AssemblyProduct = "MBrace.Azure"
1616
let [<Literal>] AssemblyCompany = "@mbraceproject"
1717
let [<Literal>] AssemblyCopyright = "© Nessos Information Technologies and other contributors."
1818
let [<Literal>] AssemblyTrademark = "MBrace"
19-
let [<Literal>] AssemblyMetadata_Release_Signature = "Version 1.5.3, Git Hash 08b0ac, Build Date 31102017 03:54 -04:00"
20-
let [<Literal>] AssemblyVersion = "1.5.3"
21-
let [<Literal>] AssemblyFileVersion = "1.5.3"
19+
let [<Literal>] AssemblyMetadata_Release_Signature = "Version 1.5.4, Git Hash f4f403, Build Date 31102017 11:36 -04:00"
20+
let [<Literal>] AssemblyVersion = "1.5.4"
21+
let [<Literal>] AssemblyFileVersion = "1.5.4"
2222

23-
let [<Literal>] ReleaseTag = "1.5.3"
23+
let [<Literal>] ReleaseTag = "1.5.4"

src/MBrace.Azure/Configuration/Arguments.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type private AzureArguments =
1717
| Heartbeat_Interval of seconds:float
1818
| Heartbeat_Threshold of seconds:float
1919
| [<AltCommandLine("-q")>] Quiet
20-
| [<AltCommandLine("-L")>] Log_Level of level:int
20+
| [<AltCommandLine("-L")>] Log_Level of LogLevel
2121
| [<AltCommandLine("-l")>] Log_File of path:string
2222
| [<AltCommandLine("-D")>] Detach
2323
| Working_Directory of path:string
@@ -47,8 +47,8 @@ type private AzureArguments =
4747
member arg.Usage =
4848
match arg with
4949
| Quiet -> "Suppress logging to stdout by the worker."
50-
| Log_Level _ -> "Log level for worker system logs. Critical = 1, Error = 2, Warning = 3, Info = 4, Debug = 5. Defaults to info."
51-
| Log_File _ -> "Specify a log file to write worker system logs."
50+
| Log_Level _ -> "Log level for worker system logs. Defaults to info."
51+
| Log_File _ -> "Specify a log file to write worker system logs. No file logging if left unspecified."
5252
| Max_Work_Items _ -> "Specify maximum number of concurrent work items."
5353
| Heartbeat_Interval _ -> "Specify the heartbeat interval for the worker in seconds. Defaults to 1 second."
5454
| Heartbeat_Threshold _ -> "Specify the heartbeat interval for the worker in seconds. Defaults to 300 seconds."
@@ -110,7 +110,7 @@ type ArgumentConfiguration =
110110

111111
match cfg.MaxWorkItems with Some w -> yield Max_Work_Items w | None -> ()
112112
match cfg.WorkerId with Some n -> yield Worker_Id n | None -> ()
113-
match cfg.LogLevel with Some l -> yield Log_Level (int l) | None -> ()
113+
match cfg.LogLevel with Some l -> yield Log_Level l | None -> ()
114114
match cfg.HeartbeatInterval with Some h -> yield Heartbeat_Interval h.TotalSeconds | None -> ()
115115
match cfg.HeartbeatThreshold with Some h -> yield Heartbeat_Threshold h.TotalSeconds | None -> ()
116116
match cfg.LogFile with Some l -> yield Log_File l | None -> ()
@@ -153,7 +153,7 @@ type ArgumentConfiguration =
153153
let maxWorkItems = parseResult.TryPostProcessResult(<@ Max_Work_Items @>, fun i -> if i < 0 then failwith "must be positive." elif i > 1024 then failwith "exceeds 1024 limit." else i)
154154
let quiet = parseResult.Contains <@ Quiet @>
155155
let detach = parseResult.Contains <@ Detach @>
156-
let logLevel = parseResult.TryPostProcessResult(<@ Log_Level @>, enum<LogLevel>)
156+
let logLevel = parseResult.TryGetResult <@ Log_Level @>
157157
let logFile = parseResult.TryPostProcessResult(<@ Log_File @>, fun f -> ignore <| Path.GetFullPath f ; f) // use GetFullPath to validate chars
158158
let workerName = parseResult.TryPostProcessResult(<@ Worker_Id @>, fun name -> Validate.subscriptionName name; name)
159159
let heartbeatInterval = parseResult.TryPostProcessResult(<@ Heartbeat_Interval @>, fun i -> let t = TimeSpan.FromSeconds i in if t < TimeSpan.FromSeconds 1. then failwith "must be positive" else t)

src/MBrace.Azure/Runtime/Service.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type WorkerService (config : Configuration, workerId : string) =
3636
let mutable status = 0 // 0: stopped, 1: starting, 2: running, 3: stopping
3737
let mutable subscription = None : WorkerSubscription.Subscription option
3838
let mutable cancellationTokenSource = None : CancellationTokenSource option
39-
let attacheableLogger = AttacheableLogger.Create(logLevel = LogLevel.Info, makeAsynchronous = true)
39+
let attacheableLogger = AttacheableLogger.Create(makeAsynchronous = true)
4040

4141
let trySetStarting () = Interlocked.CompareExchange(&status, 1, 0) = 0
4242
let trySetStopping () = Interlocked.CompareExchange(&status, 3, 2) = 2

src/MBrace.Azure/Runtime/StandaloneWorker.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module StandaloneWorker =
4242
cli.MaxWorkItems |> Option.iter (fun w -> svc.MaxConcurrentWorkItems <- w)
4343
cli.HeartbeatInterval |> Option.iter (fun i -> svc.HeartbeatInterval <- i)
4444
cli.HeartbeatThreshold |> Option.iter (fun i -> svc.HeartbeatThreshold <- i)
45-
svc.LogFile <- defaultArg cli.LogFile "logs.txt"
45+
cli.LogFile |> Option.iter (fun l -> svc.LogFile <- l)
4646
cli.LogLevel |> Option.iter (fun l -> svc.LogLevel <- l)
4747

4848
Console.Title <- sprintf "%s(%d) : %s" proc.ProcessName proc.Id svc.Id

0 commit comments

Comments
 (0)