| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
follow up https://github.com/nim-lang/Nim/pull/22851
follow up https://github.com/nim-lang/Nim/pull/22873
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
* fix tests
* fix tests
* next step
* rename to syncio
* rename
* fix nimscript
* comma
* fix
* fix parts of errors
* good for now
* fix test
|
| |
|
| |
|
|
|
|
|
| |
* Fix broken links in docs
* Fix rand HSlice links
|
|
|
| |
Co-authored-by: Hendrik Albers <mail@hendrik.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
| |
Just minor addition to the documentation with the use of operators
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
buffer; refs #3270
|
| |
|
|
|
| |
Allow Nim users to create their own loggers
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Removed formatting from logging.
|
| | |
|
| |
| |
| |
| |
| | |
Documented bufSize param in logging.nim to complete the previous change
that added a bufSize parameter to file based logger constructors.
|
|/
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
frmt: string, args: varargs[string, ])
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|