public class LoggingExample extends Object
This example demonstrates a simple/typical Logging usage.
See the README for compilation instructions. Run this code with
target/appassembler/bin/LoggingExample
-Dexec.args="[<project_id>]
create metric <metric> <filter>
create sink <sink> bucket|dataset|topic <destination> <filter>?
list metrics
list sinks
list resource-descriptors
list entries <filter>?
delete metric <metric>
delete sink <sink>
delete log <logName>
into metric <metric>
info sink <sink>
write <logName> <severity> <message> (<key> <value>)*"
The first parameter is an optional project_id (logged-in project will be used if not
supplied). Second parameter is a Logging operation and can be used to demonstrate its usage. For
operations that apply to more than one entity (`list`, `create`, `info` and `delete`) the third
parameter specifies the entity.
| Constructor and Description |
|---|
LoggingExample() |
Copyright © 2016 Google. All rights reserved.