S returns the global SugaredLogger, which can be reconfigured with ReplaceGlobals. It's safe for concurrent use.
()
| 55 | // S returns the global SugaredLogger, which can be reconfigured with |
| 56 | // ReplaceGlobals. It's safe for concurrent use. |
| 57 | func S() *SugaredLogger { |
| 58 | _globalMu.RLock() |
| 59 | s := _globalS |
| 60 | _globalMu.RUnlock() |
| 61 | return s |
| 62 | } |
| 63 | |
| 64 | // ReplaceGlobals replaces the global Logger and SugaredLogger, and returns a |
| 65 | // function to restore the original values. It's safe for concurrent use. |
no outgoing calls