Code Monkey home page Code Monkey logo

macsystemconsolelogger4juce's Introduction

MacSystemConsoleLogger4JUCE

A small & simple JUCE-module that inherits from juce::Logger and redirects Log messages to NSLog. This will make them appear in the OS X Console.app

To use it just add a private MacSystemConsoleLogger macSystemConsoleLogger; to your JUCEApplication class and add the line Logger::setCurrentLogger (&macSystemConsoleLogger); to the constructor. Now Logger::writeToLog ("foo") will result in an output of that string to the OS X Log that might be viewed through your system's Console.app and to the XCode console while running in the IDE. For fallback compatibility, it will invoke an output to stderr on all other platforms.

On destruction, the instance will check if it's still the current Logger. If that's true, it will automatically reassign a nullptr to the current Logger so that it falls back into it's default state. If you changed to another logger during the MacSystemConsoleLogger's lifetime, nothing will happen.

macsystemconsolelogger4juce's People

Contributors

janosgit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.