about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--src/main.rs2
2 files changed, 5 insertions, 3 deletions
diff --git a/README.md b/README.md
index 28b72b98726b..da55d741af80 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,6 @@ instances.
 
 3. Start `journaldriver`, for example via `systemd`.
 
-
 ## Usage outside of Google Cloud Platform
 
 When running outside of GCP, the following extra steps need to be
@@ -56,8 +55,11 @@ performed:
      should be written.
    * `GOOGLE_APPLICATION_CREDENTIALS`: Filesystem path to the
      JSON-file containing the service account's private key.
-   * `LOG_NAME`: Name of the target log stream in Stackdriver Logging.
+   * `LOG_STREAM`: Name of the target log stream in Stackdriver Logging.
      This will be automatically created if it does not yet exist.
+   * `LOG_NAME`: Name of the target log to write to. This defaults to
+     `journaldriver` if unset, but it is recommended to - for
+     example - set it to the machine hostname.
 
 ## Upcoming features:
 
diff --git a/src/main.rs b/src/main.rs
index 9db3c94ecf39..33ca57dddbbe 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -153,7 +153,7 @@ fn get_project_id() -> String {
 /// On non-GCP machines the value is determined by using the
 /// `GOOGLE_CLOUD_PROJECT` and `LOG_NAME` environment variables.
 fn determine_monitored_resource() -> Value {
-    if let Ok(log) = env::var("LOG_NAME") {
+    if let Ok(log) = env::var("LOG_STREAM") {
         json!({
             "type": "logging_log",
             "labels": {