summary refs log tree commit diff stats
path: root/lib/pure/logging.nim
Commit message (Collapse)AuthorAgeFilesLines
* complete std prefixes for stdlib (#22887)ringabout2023-10-301-2/+2
| | | | follow up https://github.com/nim-lang/Nim/pull/22851 follow up https://github.com/nim-lang/Nim/pull/22873
* Markdown code blocks migration part 8 (#22478)Andrey Makarov2023-08-151-19/+38
|
* Allow users to set log flushing rules (#20817)Matt Haggard2022-11-141-17/+35
| | | | | | | | | | | * Add flushThreshold to std/logging loggers * Remove duplicate field * Add -d:nimFlushAllLogs for changing default flush behavior globally * Add changelog entry for log flushing change * Flush all log levels by default in Nim v2
* make implicit cstring conversions explicit (#19488)ee72022-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Nim manual says that an implicit conversion to cstring will eventually not be allowed [1]: A Nim `string` is implicitly convertible to `cstring` for convenience. [...] Even though the conversion is implicit, it is not *safe*: The garbage collector does not consider a `cstring` to be a root and may collect the underlying memory. For this reason, the implicit conversion will be removed in future releases of the Nim compiler. Certain idioms like conversion of a `const` string to `cstring` are safe and will remain to be allowed. And from Nim 1.6.0, such a conversion triggers a warning [2]: A dangerous implicit conversion to `cstring` now triggers a `[CStringConv]` warning. This warning will become an error in future versions! Use an explicit conversion like `cstring(x)` in order to silence the warning. However, some files in this repo produced such a warning. For example, before this commit, compiling `parsejson.nim` would produce: /foo/Nim/lib/pure/parsejson.nim(221, 37) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv] /foo/Nim/lib/pure/parsejson.nim(231, 39) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv] This commit resolves the most visible `CStringConv` warnings, making the cstring conversions explicit. [1] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/doc/manual.md#cstring-type [2] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/changelogs/changelog_1_6_0.md#type-system
* move io out of system (#19442)flywind2022-02-021-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | * move io out of system * fix tests * fix tests * next step * rename to syncio * rename * fix nimscript * comma * fix * fix parts of errors * good for now * fix test
* Use `.. warning::` (#17320)konsumlamm2021-03-101-9/+9
|
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-281-3/+3
|
* Fix broken links in docs (#16336)Elliot Waite2020-12-141-4/+4
| | | | | * Fix broken links in docs * Fix rand HSlice links
* fix index error (#14974)Hendrik2020-07-141-1/+2
| | | Co-authored-by: Hendrik Albers <mail@hendrik.dev>
* Fix logging tiny bug (#14910)Juan Carlos2020-07-061-3/+7
| | | | | | | | | | | | | | | | | | | * Fix logging tiny bug * Update changelog.md Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com> * Update changelog.md Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com> * Update changelog.md Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com> * https://github.com/nim-lang/Nim/pull/14910#discussion_r450012032 Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
* [backport] run nimpretty on the remaining filesnarimiran2019-09-301-23/+25
|
* Fixes effect error in pure/logging.nim (#11898)Zachary Carter2019-08-081-1/+1
| | | | | | | | * Fix effect error in pure/logging.nim Currently calling `logging.log` will produce - `Error: can have an unlisted effect: RootEffect`. Add `RootEffect` to list of tags. * the only tag necessary is RootEffect since all other Effects are descendants of RootEffect
* logging: better documentation (#10895)Jjp1372019-03-241-94/+572
|
* Adding more documentation to logging.nimIstvan2018-12-171-1/+6
| | | Just minor addition to the documentation with the use of operators
* write logs to stderr instead of stdout; fixes #9547 (#9554)Ahmed T. Youssef2018-10-301-3/+8
|
* even more strict isNil handling for strings/seqs in order to detect bugsAraq2018-08-221-11/+2
|
* remove deprecated stuff from the stdlib; introduce better deprecation warningsAraq2018-05-051-4/+0
|
* make logging module compile againAndreas Rumpf2018-04-301-1/+1
|
* logging: don't crash on nil stringsYuriy Glukhov2018-01-111-2/+13
|
* fix #6264 and #6141 (#6884)skilchen2017-12-111-2/+6
|
* Fix console logger issue; fixes #5546 (#5547)Anatoly Galiulin2017-03-161-2/+5
|
* Explicitly mark log() method as gcsafeRuslan Mustakov2017-02-271-1/+1
|
* Add warning about log flushing. Related to #3269 (#5424)Federico Ceratto2017-02-241-0/+2
|
* Add newFileLogger overload accepting file descriptorDmitry Polienko2016-11-151-5/+13
|
* Enabled logging tests for jsYuriy Glukhov2016-09-031-4/+5
|
* Logging compatible with jsYuriy Glukhov2016-09-031-111/+124
|
* prepare Nim codebase for upcoming parser changesAndreas Rumpf2016-07-151-1/+1
|
* pure/logging: add notice level, suggest usecasesniv2016-05-011-1/+27
|
* respect global log filter levelBruce Doan2015-11-281-6/+7
|
* logging.nim: expose underlying 'file' object; errors and fatals flush the ↵Araq2015-10-121-10/+13
| | | | buffer; refs #3270
* Add substituteLog docsFederico Ceratto2015-10-091-0/+2
|
* Export substituteLogFederico Ceratto2015-10-091-1/+1
| | | Allow Nim users to create their own loggers
* renamed writeln to writeLine in libpatrick dw2015-06-191-3/+3
|
* Fix logger formattingSergey Avseyev2015-06-131-11/+20
| | | | | | | | | | | | | | | | | | | Motivation ---------- Current implementation does not allow to specify any formatting. It even cannot output log level, because `writeln()` accepts `varags[string]` and silently ignores everything before last argument. Modification ------------ Perform formatting in the single place during substitution. Make log level optional as all other substitution variables. Also make verbose logging more informative and parseable. Result ------ Correct handling formatting and substitutions. Machine-friendly default output of verbose logger.
* Merge pull request #2830 from yglukhov/logging-no-formatDominik Picheta2015-06-041-30/+22
|\ | | | | Removed formatting from logging.
| * Removed formatting from logging.yglukhov2015-05-281-30/+22
| |
* | Documented bufSize param in logging.nimx2f2015-06-011-1/+5
| | | | | | | | | | Documented bufSize param in logging.nim to complete the previous change that added a bufSize parameter to file based logger constructors.
* | Expose bufSize parameter for file-based loggersx2f2015-05-311-5/+9
|/ | | | | | newFileLogger and newRollingFileLogger have a new bufSize parameter that is used in open(). The default value -1 has the same behavior as before. Use 0 for unbuffered output to log file.
* logging: make fmtStr public to be used in user defined loggersFrank Fischer2015-05-111-1/+1
|
* Don't run non-test code when defined(testing)Oleh Prypin2015-04-211-1/+1
|
* Use `^` instead of `-` in slicesdef2015-03-281-34/+34
|
* fixed log*(logger: RollingFileLogger, level: Level,teroz2015-03-131-1/+1
| | | | frmt: string, args: varargs[string, ])
* Fix typosFederico Ceratto2015-02-151-1/+1
|
* newRollingFileLogger - fmtStr is always set to defaultFmtStrFabio Cevasco2015-02-061-1/+1
|
* Logging module is now thread-safe.Dominik Picheta2015-01-251-9/+27
|
* Happy new year!Guillaume Gelin2015-01-061-1/+1
|
* docgen should work againAraq2014-10-051-1/+4
|
* more modules updatedAraq2014-08-281-20/+20
|
* big renameAraq2014-08-271-14/+17
|
* Fixes docgen for logging module.Dominik Picheta2014-02-021-2/+2
|