Add syslog-address log-opt#13392
Conversation
There was a problem hiding this comment.
other drivers may have their own parsing routine to decide if address is correct
+1 makes sense |
4920fa6 to
8ad17fd
Compare
There was a problem hiding this comment.
Isn't it working without this?
There was a problem hiding this comment.
mmm I tried this morning and golang syslog.Dial was complaining about missing :514, will check again now gimme a minute
There was a problem hiding this comment.
yup isn't working w/o: panic: dial tcp: missing port in address localhost
There was a problem hiding this comment.
address + ":514"
Also see net.SplitHostPort, I think this would be better.
There was a problem hiding this comment.
@cpuguy83 better to check if port isn't defined?
There was a problem hiding this comment.
Well, you are already doing that, but SplitHostPort is a bit more sophisticated and works with ipv6.
There was a problem hiding this comment.
Yeah, I think it's better, too.
8ad17fd to
261875e
Compare
261875e to
9baa64b
Compare
There was a problem hiding this comment.
Seems like it can return three types of error and your case only for one :)
59ecada to
7cc8d05
Compare
There was a problem hiding this comment.
You should use + to concatenate strings instead of fmt.
There was a problem hiding this comment.
done both, overlooked your last comments sorry
6048313 to
23ae19d
Compare
|
ping @docker/core-maintainers |
ef6916c to
5aec59d
Compare
There was a problem hiding this comment.
@runcom can you verify this will not relax IsURL checks for other callers?
There was a problem hiding this comment.
@tiborvass this will def relax IsURL so I'm gonna do that simple Prefix checks here in logger
|
Adding to 1.7 milestone b/c I think this is super-important as well. |
|
Also definitely +1 here. |
|
Not completely happy with the "The following logging options are supported for this logging driver: [none]" sentences, but for now it should suffice 😄 LGTM do we need another look at #13392 (comment)? |
|
@thaJeztah I borrowed that sentence from the previous docs but I'm sure we can change it later during a refactor (other pr are pulling in log driver options doc as well) wrt that comment, I prefer to have a final go from them |
|
Having a bit of trouble following all the
|
|
There was a problem hiding this comment.
tics around syslod and syslog in text.
There was a problem hiding this comment.
syslod is a typo, it should be syslogd.
|
With formatting changes, LGTM. Thank you for the contribution. |
4fa10c1 to
1052f9c
Compare
|
@jberryman updated this pr to include custom unix socket log options ping @tiborvass @LK4D4 @cpuguy83 to have another last look on this since I updated code to include specifing a custom unix socket path |
|
Moving back to code review then. |
|
thx @icecrime |
|
@runcom lol. need rebase :) |
There was a problem hiding this comment.
i would split this in two for tcp|udp and unix, because of the host:port|path part
1052f9c to
ffd02f4
Compare
There was a problem hiding this comment.
no need for extra variable
There was a problem hiding this comment.
isn't cleaner not to use url.Path twice? or is that bad? or is ok, I'll change it :)
There was a problem hiding this comment.
it's a compiled language :)
There was a problem hiding this comment.
yeah and I'm too used to dynamic ones doh
ffd02f4 to
40fd8b1
Compare
Signed-off-by: Antonio Murdaca <[email protected]>
40fd8b1 to
e8c88d2
Compare
|
@tiborvass took care of your comments |
|
LGTM. Merging since it looks like it already went through docs review. |
|
thanks guys 🎉 |
|
@jberryman now you could test the latest master code with this log-opt for unix socket :) |
|
cherry-picked \o/ thanks for assigning me |
Didn't add tests and docs yet, just want to agree on what I did here
This adds
--log-opt syslog-address=tcp://127.0.0.1:514to be able to specify a remote syslog server to log thinghies (suggestions regarding the name I've choosen are welcome if you don't like it)I removed
ValidateLogOptsbecause basically I think driver's specific opts shouldn't be checked in opts/opts.go otherwise it will be cluttered in no time and it's driver's business to handle its own opts.But I still think it could be useful for drivers shared options like
tagwhere docker could let people chose which field to use for the tag (like container or name for instance EDIT on this tag more info here: #12876 (comment))ping @LK4D4 @duglin @thaJeztah
resolves #13362
Signed-off-by: Antonio Murdaca [email protected]