Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change date formats in logging to use RFC3339 #434

Open
wants to merge 2 commits into
base: mainline
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/hibernation/hibernatelogger_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func getHibernateSeelogConfig() string {
<rollingfile type="size" filename="/var/log/amazon/ssm/hibernate.log" maxsize="30000" maxrolls="2"/>
</outputs>
<formats>
<format id="fmtinfo" format="%Date %Time %LEVEL %Msg%n"/>
<format id="fmtinfo" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL %Msg%n"/>
</formats>
</seelog>`
return seelogConfig
Expand Down
2 changes: 1 addition & 1 deletion agent/hibernation/hibernatelogger_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func getHibernateSeelogConfig() string {
<rollingfile type="size" filename="` + seelogConfigFilePath + `" maxsize="30000" maxrolls="2"/>
</outputs>
<formats>
<format id="fmtinfo" format="%Date %Time %LEVEL %Msg%n"/>
<format id="fmtinfo" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL %Msg%n"/>
</formats>
</seelog>`
return seelogConfig
Expand Down
6 changes: 3 additions & 3 deletions agent/log/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ func LoadLog(defaultLogDir string, logFile string, debugStatus string) []byte {
</filter>
</outputs>
<formats>
<format id="fmterror" format="%Date %Time %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtdebug" format="%Date %Time %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtinfo" format="%Date %Time %LEVEL %Msg%n"/>
<format id="fmterror" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtdebug" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtinfo" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL %Msg%n"/>
</formats>
</seelog>
`
Expand Down
6 changes: 3 additions & 3 deletions seelog_unix.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
</filter>
</outputs>
<formats>
<format id="fmterror" format="%Date %Time %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtdebug" format="%Date %Time %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtinfo" format="%Date %Time %LEVEL %Msg%n"/>
<format id="fmterror" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtdebug" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtinfo" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL %Msg%n"/>
</formats>
</seelog>
6 changes: 3 additions & 3 deletions seelog_windows.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</filter>
</outputs>
<formats>
<format id="fmterror" format="%Date %Time %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtdebug" format="%Date %Time %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtinfo" format="%Date %Time %LEVEL %Msg%n"/>
<format id="fmterror" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtdebug" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL [%FuncShort @ %File.%Line] %Msg%n"/>
<format id="fmtinfo" format="%Date(2006-01-02T15:04:05Z07:00) %LEVEL %Msg%n"/>
</formats>
</seelog>