Comments (5)
I know this may seem strange, but make sure you've cleaned your compiled classes to avoid legacy Macro compiled code. If that doesn't resolve it, please share a minimal application with me that reproduces the error and I'll dig in from there. Also, is it possible you have pre-compiled code referring to an older version of Scribe?
from scribe.
Not strange at all. The first thing I did is made sure to clear out all compiled artifacts.
The project is closed source code, but I'll see if I can get it reproduced in a minimal application without breaching nondisclosure.
from scribe.
I went the other way around and removed scribe method calls one by one until it compiled. Here are the culprits:
scribe.info(f"Constructing (max: ${Runtime.getRuntime.maxMemory / 1e6}%.0f, $memoryString)")
(def memoryString: String = f"total: ${Runtime.getRuntime.totalMemory/1e6}%.0f, free: ${Runtime.getRuntime.freeMemory/1e6}%.0f"
)
_ = scribe.info(s"Public page ${page.copy(content = Array.empty[Byte])} was found for processing.")
inside a monix.eval.Task
for-comprehension
pubRes.foreach(_ => scribe.info(f"New public and private reprs for mark ${m.id} with similarity ${pubRes.get.repr.vecSimilarity(res0.repr)}%.3f"))
pubRes being an instance of Option
from scribe.
Just for kicks, try replacing those interpolators with Scribe's sfi
interpolator.
For example, for the first item it would be:
scribe.info(sfi"Constructing (max: ${(Runtime.getRuntime.maxMemory / 1e6).f(f = 1)}, $memoryString)"
If you look at the https://github.com/outr/scribe/blob/master/core/shared/src/main/scala/scribe/implicits/LongImplicits.scala and https://github.com/outr/scribe/blob/master/core/shared/src/main/scala/scribe/implicits/DoubleImplicits.scala they offer a more type-safe numeric formatting alternative. In addition, sfi
is usually about ten times faster than f
or s
as it uses a Macro to create far more efficient string building.
from scribe.
Thanks. Had no idea scribe has its own interpolator.
from scribe.
Related Issues (20)
- Eval Feature
- Formatter colors are not correctly resetted HOT 14
- scribe-cats scala-native artifacts HOT 1
- Support Same-Line logging
- Scribe chokes in both SBT and the IntelliJ console due to believing there's not enough columns HOT 13
- Log4JMigrationjava NoSuchElementException: Add a default value for EventCounter HOT 8
- Scala JS source maps, map to release dir? HOT 9
- No colours when run on Node.js HOT 14
- TASTy file was produced by Scala 3.2.0 HOT 7
- [Suggestion] improve JSON logging usability HOT 5
- REPL: scribe macro NPE when the scala source file is virtual HOT 2
- Include ISO8601 datetime formatters in core HOT 7
- Logstash encoding for stdout HOT 2
- Exceptions are not logged by SLF4JHelper since 3.9.0 HOT 5
- Unable to have minimumLevel=Info and only enable Trace for certain packages HOT 11
- Overriding the path for log files HOT 4
- Help: configure stdout/stderr in function of LogLevel HOT 15
- Compare perfomance with Chronicle-Logger HOT 2
- NPE when logging with SLF4J and Throwble == null HOT 4
- Different versions of scala-collection-compat pulled in transitively HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scribe.