File tree Expand file tree Collapse file tree 3 files changed +6
-22
lines changed Expand file tree Collapse file tree 3 files changed +6
-22
lines changed Original file line number Diff line number Diff line change 1+ import Foundation
12import Logging
23
34var logger = Logger ( label: " com.automattic.hostmgr " )
45
56func initializeLoggingSystem( ) {
6- logger. logLevel = . trace
7+ let logLevelFromEnv = ProcessInfo . processInfo. environment [ " LOG_LEVEL " ] . flatMap { Logger . Level ( rawValue: $0) }
8+ logger. logLevel = logLevelFromEnv ?? . info
79 LoggingSystem . bootstrap { label in
810 MultiplexLogHandler ( [
911 StreamLogHandler . standardError ( label: label)
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ struct S3Manager {
125125 for bucket: String ,
126126 in region: Region
127127 ) throws -> S3 {
128- let timeout = TimeAmount . minutes ( 30 )
128+ let timeout = TimeAmount . hours ( 2 )
129129 let s3Client = S3 ( client: aws, region: region, timeout: timeout)
130130
131131 guard Configuration . shared. allowAWSAcceleratedTransfer else {
Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ import libhostmgr
55
66struct Hostmgr : ParsableCommand {
77
8- private var appVersion = " 0.14.1 "
8+ private static var appVersion = " 0.14.2 "
99
1010 static var configuration = CommandConfiguration (
1111 abstract: " A utility for managing VM hosts " ,
12+ version: appVersion,
1213 subcommands: [
1314 VMCommand . self,
1415 SyncCommand . self,
@@ -18,25 +19,6 @@ struct Hostmgr: ParsableCommand {
1819 BenchmarkCommand . self,
1920 ConfigCommand . self
2021 ] )
21-
22- @Flag ( help: " Print the version and exit " )
23- var version : Bool = false
24-
25- func run( ) throws {
26- guard version == false else {
27- print ( appVersion)
28- return
29- }
30-
31- logger. debug ( " Starting Up " )
32-
33- guard Configuration . isValid else {
34- print ( " Invalid configuration – exiting " )
35- throw ExitCode ( 1 )
36- }
37-
38- throw CleanExit . helpRequest ( self )
39- }
4022}
4123
4224initializeLoggingSystem ( )
You can’t perform that action at this time.
0 commit comments