Coder Social home page Coder Social logo

sawbuck's Introduction

Sawbuck is a log viewer and controller for Windows Chrome logging, and for other applications or plugins that use the logging facility in Chrome base.

Logging in Chrome is integrated with Event Tracing for Windows (ETW), which allows ETW controllers like Sawbuck to control log verbosity at runtime. The Chrome logging integration also captures the call stack at the logging site, which can then be resolved and displayed by log viewers such as Sawbuck.

How to get this for my own code? If you're using the Chrome base library, then integrating your logging with ETW is as simple as allocating a new GUID by running guidgen.exe, then initializing the ETW log provider as so.

  #include "base/logging.h"
  #include "base/logging_win.h"
  #include <initguid.h>

  // {????????-????-????-????-????????}
  DEFINE_GUID(kMyLogProvider,
      0x????????,
      0x????,
      0x????,
      0x??, 0x??, 0x??, 0x??, 0x??, 0x??, 0x??, 0x??);

  void InitLogging() {
    logging::LogEventProvider::Initialize(kMyLogProvider);
  }

You will then need to write your provider GUID and name to the registry for Sawbuck to know about it. Create a new key at

HKEY_LOCAL_MACHINE\Software\Google\Sawbuck\Providers with your provider GUID as the name of the key, with your provider textual name as the default string value of the key. Feel free to send a patch to the Sawbuck installer with your changes to the installer's registration to get your provider added to Sawbuck. If you're not using Chrome base, you'll need to duplicate what chrome/base/logging_win.cc does.

How to Contribute Start by downloading an installer, installing it and playing with Sawbuck. Browse and perhaps sign up to the sawbuck-dev discussion group. Get the sources and build them. Check out the issues list. Contribute a patch. Have fun!

sawbuck's People

Contributors

chhamilton avatar sigurasg avatar sebmarchand avatar rogerm avatar bergeret avatar robertshield avatar fdoray avatar mukel avatar madecoste avatar joisig avatar slightlyoff avatar

Watchers

rosa maria palacios juncosa avatar  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.