blob: 10b0de572e7b472d75fa2c89798895f675ca0416 [file] [log] [blame]
// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ENTD_SYSLOG_H_
#define ENTD_SYSLOG_H_
#include <string>
#include <base/basictypes.h>
#include <v8.h>
#include "entd/js_object_wrapper.h"
namespace entd {
// Very simple JS bindings for sending output to the syslog
//"foo") -> LOG(INFO)
// entd.warn("foo") -> LOG(WARNING)
// entd.error("foo") -> LOG(ERROR)
class Syslog : public JSObjectWrapper<Syslog> {
Syslog() {}
virtual ~Syslog();
static const char* GetClassName() { return "syslog"; }
// Binds "info", "warn", and "error" functions.
static void SetTemplateBindings(
v8::Handle<v8::ObjectTemplate> template_object);
} // namespace entd
#endif // ENTD_SYSLOG_H_