Comments (6)
Note when using the Console.App to view your logs:
be sure to enable "Action --> Enable Debug Messages/Info Messages" from the Menu. Those options are off by default...
gave me a small headache before discovering this
from cleanroomlogger.
Hi Andres,
To make it simple for external flags to control debugging-related behavior, the XcodeLogConfiguration
initializer takes two parameters that affect this:
There's a debugMode
argument and another called verboseDebugMode
. Both of these accept a Bool
value that will enable logging at the .debug
and .verbose
levels respectively. When not explicitly specified, these values default to false
.
We use this, for example, to set separate DEBUG
and VERBOSE
flags (using the SWIFT_ACTIVE_COMPILATION_CONDITIONS
build setting in Xcode).
This is described a bit more in the documentation, but now that I see the confusion, I'm thinking I might need to change it so minimumSeverity
always overrides those values when they're false
.
Hope this helps,
E.
from cleanroomlogger.
Thanks! Turns out the issue is happening only on the simulator, does not happen on the device.
from cleanroomlogger.
The behavior you're seeing doesn't sound intentional, and I'm wondering if something else is going on. When you're viewing the output of the logs, are you viewing then through the Mac's Console.app, through the Xcode console pane, or reading log files?
Also, if nothing obvious becomes apparent, would you mind sending me source I could use to try to replicate the problem for myself?
from cleanroomlogger.
Further testing... The issue only seems t happen in appCode, using the simulator.
appCode, Sim - Issue, only 'Info' as originally noted.
appCode, Device - Works as expected.
Xcode, sim -Works as expected.
Xcode Device - Works as expected.
Let me know if you have trouble replicating the issue.
from cleanroomlogger.
@AndresCanella I'm having a similar issue, but it doesn't seem to work for me on the device. I'm using a real device and XCode. Here's my code:
Log.enable(minimumSeverity: .verbose,
debugMode: true,
verboseDebugMode: true,
stdStreamsMode: .useAsFallback,
mimicOSLogOutput: true,
showCallSite: true,
filters: [])
Log.verbose?.message("* Verbose")
Log.debug?.message("* Debug")
Log.info?.message("* Info")
Log.warning?.message("* Warning")
Log.error?.message("* Error")
And my output:
2017-06-22 10:20:18.882173-0700 RhombusAppStore[6855:2805459] [CleanroomLogger] 🔷 * Info (AppDelegate.swift:175)
2017-06-22 10:20:18.882409-0700 RhombusAppStore[6855:2805459] [CleanroomLogger] 🔶 * Warning (AppDelegate.swift:176)
2017-06-22 10:20:18.882531-0700 RhombusAppStore[6855:2805459] [CleanroomLogger] ❌ * Error (AppDelegate.swift:177)
from cleanroomlogger.
Related Issues (20)
- Swift 5 support HOT 2
- Carthage: Invalid cache causes rebuilds HOT 1
- Feature Request: Disable Logging or change Configuration applied while session is active
- Accessing logs from the bottom of the rotating logger HOT 1
- Lack of bitcode in debug builds causes linker failure in integrating target with bitcode enabled
- Install fails when using package manager HOT 2
- Logging to file questions
- Exit code 65 error with Xcode 9 GM and ~> 6.0.0 HOT 4
- Log directory not created XCode 9, macOS High Sierra, CleanroomLogger 6.0.0 HOT 1
- Carthage Failing HOT 3
- How to get/upload files from the watchOS?
- 5.1.1 not compatible with tvOS? HOT 1
- very long strings are cut off HOT 1
- Question: Is possible to capture STDOUT / STDERR?
- Crash while printing warning messge. HOT 2
- How to read the written logs?
- FileLogRecorder asynchronous or synchronous Mode issue
- Provide possibility to customize Category in OSLogRecorder
- There is no logs in xcode console
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 cleanroomlogger.