aboutsummaryrefslogtreecommitdiffstats
path: root/vespalog/src/main/java/com/yahoo/log/impl/LogUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespalog/src/main/java/com/yahoo/log/impl/LogUtils.java')
-rw-r--r--vespalog/src/main/java/com/yahoo/log/impl/LogUtils.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/vespalog/src/main/java/com/yahoo/log/impl/LogUtils.java b/vespalog/src/main/java/com/yahoo/log/impl/LogUtils.java
new file mode 100644
index 00000000000..8c182625c85
--- /dev/null
+++ b/vespalog/src/main/java/com/yahoo/log/impl/LogUtils.java
@@ -0,0 +1,23 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.log.impl;
+
+import static com.yahoo.vespa.defaults.Defaults.getDefaults;
+
+/**
+ * @author Ulf Lilleengen
+ * @author Bjorn Borud
+ * @author arnej27959
+ * @author bjorncs
+ * TODO remove "public" keyword, should be package private
+ */
+public class LogUtils {
+ public static boolean empty(String s) {
+ return (s == null || s.equals(""));
+ }
+ public static String getHostName () {
+ return getDefaults().vespaHostname();
+ }
+ public static String getPID() {
+ return Long.toString(ProcessHandle.current().pid());
+ }
+}