Bug 5632 - impossible to log to log file %S.log
Summary: impossible to log to log file %S.log
Status: NEW
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Config Files (show other bugs)
Version: 3.0.25b
Hardware: x86 Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2008-07-24 10:13 UTC by Pierre DELAAGE
Modified: 2008-07-24 10:32 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Pierre DELAAGE 2008-07-24 10:13:52 UTC
It is not possible to log to /var/log/samba/%S.log,
in the aim to have a log system based on "service" name.
e.g: if I have two shared folders, given share names "mickeymouse" and "donaldduck", I would like to log separately access to both of these shares in separate log files mickeymouse.log and donaldduck.log.

Theorically it is possible according to various samba documents such as :
"Using Samba", O'reilly, 2nd version of 2003, chapter 12 "Troubleshooting Samba", subchapter "Samba Logs", at url http://us1.samba.org/samba/docs/using_samba/ch12.html

See also same book, chapter 6 at http://us1.samba.org/samba/docs/using_samba/ch06.html, subchapter "Logging Configuration Options", table 6.8 stating "log file option...works with ALL variables".

Apparently samba does not support %S variable in log file name.

FYI %U, %I and %m work normally.
Comment 1 Pierre DELAAGE 2008-07-24 10:32:24 UTC
Moreover :
whar is created by samba is just a file with the LITERAL name "/var/log/samba/%S.log", ie % has been taken literally by samba and did not lead to var substitution.