View definition


Defined in


SetAdditionalStackDepth sets the additional number of frames to skip by runtime.Caller when getting function information needed to print seelog format identifiers such as %Func or %File.

This func may be used when you wrap seelog funcs and want to print caller info of you own wrappers instead of seelog func callers. In this case you should set depth = 1. If you then wrap your wrapper, you should set depth = 2, etc.

NOTE: Incorrect depth value may lead to errors in runtime.Caller evaluation or incorrect function/file names in log files. Do not use it if you are not going to wrap seelog funcs. You may reset the value to default using a SetAdditionalStackDepth(0) call.

SetAdditionalStackDepth is referenced in 3 repositories