Category Archives: Samba

Custom log levels for different components of samba

Lately I’ve been coding a little bit on openchange which runs inside samba. Until now has been a pain in the neck to look into samba.log file because of the noise.

I’ve just found out a way to customize the log verbosity per component, you can specify it (on your /etc/samba/smb.cnf file) with something like this:

log level = 5 tdb:0 ldb:0

With that we will get a log level configuration like this:

Current debug levels:
  all: 5
  tdb: 0
  printdrivers: 5
  lanman: 5
  smb: 5
  rpc_parse: 5
  rpc_srv: 5
  rpc_cli: 5
  passdb: 5
  sam: 5
  auth: 5
  winbind: 5
  vfs: 5
  idmap: 5
  quota: 5
  acls: 5
  locking: 5
  msdfs: 5
  dmapi: 5
  registry: 5
  scavenger: 5
  dns: 5
  ldb: 0

Personally now I’m using log level = 0 smb:5 because is what I’ve interested in and now I’m a bit happier than yesterday :).