Package com.pulumi

Class Log

  • All Implemented Interfaces:
    com.pulumi.deployment.internal.CountingLogger

    @ParametersAreNonnullByDefault
    public class Log
    extends java.lang.Object
    implements com.pulumi.deployment.internal.CountingLogger
    Logging functions that can be called from a Java application that will be logged to the Pulumi log stream. These events will be printed in the terminal while the Pulumi app runs, and will be available from the CLI and Web console afterwards.
    • Constructor Summary

      Constructors 
      Constructor Description
      Log​(com.pulumi.deployment.internal.EngineLogger logger)  
      Log​(com.pulumi.deployment.internal.EngineLogger logger, boolean excessiveDebugOutput)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debug​(java.lang.String message)
      Logs a debug-level message that is generally hidden from end-users.
      void debug​(java.lang.String message, Resource resource)
      Logs a debug-level message that is generally hidden from end-users.
      void debug​(java.lang.String message, Resource resource, java.lang.Integer streamId, java.lang.Boolean ephemeral)
      Logs a debug-level message that is generally hidden from end-users.
      void debugOrExcessive​(java.lang.String debugMessage, java.lang.String excessiveMessage)  
      void error​(java.lang.String message)
      Logs a fatal condition.
      void error​(java.lang.String message, Resource resource)
      Logs a fatal condition.
      void error​(java.lang.String message, Resource resource, java.lang.Integer streamId, java.lang.Boolean ephemeral)
      Logs a fatal condition.
      void exception​(java.lang.Exception exception)
      Logs an exception.
      void exception​(java.lang.Exception exception, Resource resource)
      Logs an exception.
      void exception​(java.lang.Exception exception, Resource resource, java.lang.Integer streamId, java.lang.Boolean ephemeral)
      Logs an exception.
      void excessive​(java.lang.String message, java.lang.Object... args)  
      int getErrorCount()  
      boolean hasLoggedErrors()  
      static Log ignore()  
      void info​(java.lang.String message)
      Logs an informational message that is generally printed to stdout during resource operations.
      void info​(java.lang.String message, Resource resource)
      Logs an informational message that is generally printed to stdout during resource operations.
      void info​(java.lang.String message, Resource resource, java.lang.Integer streamId, java.lang.Boolean ephemeral)
      Logs an informational message that is generally printed to stdout during resource operations.
      void warn​(java.lang.String message)
      Logs a warning to indicate that something went wrong, but not catastrophically so.
      void warn​(java.lang.String message, Resource resource)
      Logs a warning to indicate that something went wrong, but not catastrophically so.
      void warn​(java.lang.String message, Resource resource, java.lang.Integer streamId, java.lang.Boolean ephemeral)
      Logs a warning to indicate that something went wrong, but not catastrophically so.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Log

        public Log​(com.pulumi.deployment.internal.EngineLogger logger)
      • Log

        public Log​(com.pulumi.deployment.internal.EngineLogger logger,
                   boolean excessiveDebugOutput)
    • Method Detail

      • ignore

        public static Log ignore()
      • excessive

        public void excessive​(java.lang.String message,
                              java.lang.Object... args)
      • debugOrExcessive

        public void debugOrExcessive​(java.lang.String debugMessage,
                                     java.lang.String excessiveMessage)
      • debug

        public void debug​(java.lang.String message)
        Logs a debug-level message that is generally hidden from end-users.
      • debug

        public void debug​(java.lang.String message,
                          @Nullable
                          Resource resource)
        Logs a debug-level message that is generally hidden from end-users.
      • debug

        public void debug​(java.lang.String message,
                          @Nullable
                          Resource resource,
                          @Nullable
                          java.lang.Integer streamId,
                          @Nullable
                          java.lang.Boolean ephemeral)
        Logs a debug-level message that is generally hidden from end-users.
      • info

        public void info​(java.lang.String message)
        Logs an informational message that is generally printed to stdout during resource operations.
      • info

        public void info​(java.lang.String message,
                         @Nullable
                         Resource resource)
        Logs an informational message that is generally printed to stdout during resource operations.
      • info

        public void info​(java.lang.String message,
                         @Nullable
                         Resource resource,
                         @Nullable
                         java.lang.Integer streamId,
                         @Nullable
                         java.lang.Boolean ephemeral)
        Logs an informational message that is generally printed to stdout during resource operations.
      • warn

        public void warn​(java.lang.String message)
        Logs a warning to indicate that something went wrong, but not catastrophically so.
      • warn

        public void warn​(java.lang.String message,
                         @Nullable
                         Resource resource)
        Logs a warning to indicate that something went wrong, but not catastrophically so.
      • warn

        public void warn​(java.lang.String message,
                         @Nullable
                         Resource resource,
                         @Nullable
                         java.lang.Integer streamId,
                         @Nullable
                         java.lang.Boolean ephemeral)
        Logs a warning to indicate that something went wrong, but not catastrophically so.
      • error

        public void error​(java.lang.String message)
        Logs a fatal condition. Consider raising an exception after calling Error to stop the Pulumi program.
      • error

        public void error​(java.lang.String message,
                          @Nullable
                          Resource resource)
        Logs a fatal condition. Consider raising an exception after calling Error to stop the Pulumi program.
      • error

        public void error​(java.lang.String message,
                          @Nullable
                          Resource resource,
                          @Nullable
                          java.lang.Integer streamId,
                          @Nullable
                          java.lang.Boolean ephemeral)
        Logs a fatal condition. Consider raising an exception after calling Error to stop the Pulumi program.
      • exception

        public void exception​(java.lang.Exception exception)
        Logs an exception. Consider raising the exception after calling this method to stop the Pulumi program.
      • exception

        public void exception​(java.lang.Exception exception,
                              @Nullable
                              Resource resource)
        Logs an exception. Consider raising the exception after calling this method to stop the Pulumi program.
      • exception

        public void exception​(java.lang.Exception exception,
                              @Nullable
                              Resource resource,
                              @Nullable
                              java.lang.Integer streamId,
                              @Nullable
                              java.lang.Boolean ephemeral)
        Logs an exception. Consider raising the exception after calling this method to stop the Pulumi program.
      • getErrorCount

        public int getErrorCount()
        Specified by:
        getErrorCount in interface com.pulumi.deployment.internal.CountingLogger
      • hasLoggedErrors

        public boolean hasLoggedErrors()
        Specified by:
        hasLoggedErrors in interface com.pulumi.deployment.internal.CountingLogger