Skip to content
cihub edited this page May 18, 2012 · 5 revisions

Sometimes you may want to strip debug symbols from your final binary executable file to reduce its size after the program has been debugged and to limit dynamically bound symbols.

For example you can do it this way:

go build -ldflags '-s'

Seelog and stripped symbols

You can still use Seelog with such binaries. However, note the following effects because of the fact that you cannot now get method/file caller info:

  • All exceptions are ignored, only global constraints are used.
  • Format verbs that use file/func name print errors to log outputs.

Recommendations

  • Use a special logger config for binaries with stripped symbols.
  • In the config, avoid exceptions and format verbs that use file/func name.