Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(635)

Issue 79310043: local: all logs in one directory

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by axw
Modified:
10 years, 1 month ago
Reviewers:
mp+212346, wallyworld
Visibility:
Public.

Description

local: all logs in one directory With one exception (cloud-init-output.log), this change puts all log files in one directory on the host system: /var/log/juju-{{.Namespace}}. We now symlink ~/.juju/local/log to that directory, rather than creating symlinks to individual files. The cloud-init-output.log file is located outside of the log dir to simplify ownership and dir existence logic. It is now located in root-dir/. I've also added some extra error checking, and moved the chown syslog:adm to environs/cloudinit. Live tested with local and azure (for cloudinit changes). Can't say it fixes lp:1295501 as I can't reproduce the problem, but it at least simplifies the logic. https://code.launchpad.net/~axwalk/juju-core/lp1295501-local-logs-one-dir/+merge/212346 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : local: all logs in one directory #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -14 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M environs/cloudinit/cloudinit.go View 1 chunk +1 line, -0 lines 0 comments Download
M environs/cloudinit/cloudinit_test.go View 2 chunks +2 lines, -0 lines 0 comments Download
M provider/local/config.go View 1 2 chunks +2 lines, -1 line 0 comments Download
M provider/local/environ.go View 2 chunks +12 lines, -7 lines 0 comments Download
M provider/local/environ_test.go View 4 chunks +29 lines, -6 lines 0 comments Download

Messages

Total messages: 3
axw
Please take a look.
10 years, 1 month ago (2014-03-24 04:14:15 UTC) #1
wallyworld
LGTM with a suggestion. Could we also add a test for the environ.go changes? https://codereview.appspot.com/79310043/diff/1/provider/local/config.go ...
10 years, 1 month ago (2014-03-24 06:17:04 UTC) #2
axw
10 years, 1 month ago (2014-03-24 06:34:55 UTC) #3
Please take a look.

https://codereview.appspot.com/79310043/diff/1/provider/local/config.go
File provider/local/config.go (right):

https://codereview.appspot.com/79310043/diff/1/provider/local/config.go#newco...
provider/local/config.go:87: return fmt.Sprintf("/var/log/juju-%s",
c.namespace())
On 2014/03/24 06:17:05, wallyworld wrote:
> fmt.Sprintf("%s-%s", agent.DefaultLogDir, c.namespace())

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b