quick-newlogger-example

command
v1.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

quick-newlogger-example

The basics of setting up a custom logger and implementing it using the quick package.

Description

quick-newlogger-example demonstrates how to create a custom logger by overriding the PrintQuery, Debug, Error, and Fatal methods. This logger is then implemented by executing the quick.SetLogger function.


Prerequisites

  • go 1.12
  • Git
  • Elastic Search
  • Cassandra
    • Java 8

Running

To run this test you will need a TinkerPop server running and a graph database to connect to locally. This example was tested while using JanusGraph which can be used by locating yourself to the root directory of the Grammes project.

cd $GOPATH/src/github.com/00security/grammes

After locating yourself here then you may change directory to the /scripts folder.

cd scripts

Finally you may run the janusgraph.sh script to begin a local instance of JanusGraph. This will begin the TinkerPop server for you as well.

./janusgraph.sh

For further instructions please find yourself to the root README.md file.


Steps

General steps
  • Declares a CustomLogger struct that implements all logger methods.
  • Sets the new logger via the SetLogger method.
  • Calls DropAll to display the print out of the new logger.

Test specific steps
  • Shows how to change out the logger that's used in the quick/ package

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL