// Copyright 2016-2019, Pulumi Corporation using System; namespace Pulumi { /// /// Logging functions that can be called from a .NET 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 Web console afterwards. /// public static class Log { /// /// Logs a debug-level message that is generally hidden from end-users. /// public static void Debug(string message, Resource? resource = null, int? streamId = null, bool? ephemeral = null) => Deployment.InternalInstance.Logger.DebugAsync(message, resource, streamId, ephemeral); /// /// Logs an informational message that is generally printed to stdout during resource /// operations. /// public static void Info(string message, Resource? resource = null, int? streamId = null, bool? ephemeral = null) => Deployment.InternalInstance.Logger.InfoAsync(message, resource, streamId, ephemeral); /// /// Logs a warning to indicate that something went wrong, but not catastrophically so. /// public static void Warn(string message, Resource? resource = null, int? streamId = null, bool? ephemeral = null) => Deployment.InternalInstance.Logger.WarnAsync(message, resource, streamId, ephemeral); /// /// Logs a fatal condition. Consider raising an exception /// after calling Error to stop the Pulumi program. /// public static void Error(string message, Resource? resource = null, int? streamId = null, bool? ephemeral = null) => Deployment.InternalInstance.Logger.ErrorAsync(message, resource, streamId, ephemeral); /// /// Logs an exception. Consider raising the exception after /// calling this method to stop the Pulumi program. /// public static void Exception(Exception exception, Resource? resource = null, int? streamId = null, bool? ephemeral = null) => Error(exception.ToString(), resource, streamId, ephemeral); } }