本文整理汇总了Java中org.gradle.api.logging.Logging类的典型用法代码示例。如果您正苦于以下问题:Java Logging类的具体用法?Java Logging怎么用?Java Logging使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Logging类属于org.gradle.api.logging包,在下文中一共展示了Logging类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: AtlasExtension
import org.gradle.api.logging.Logging; //导入依赖的package包/类
public AtlasExtension(@NonNull final ProjectInternal project,
@NonNull Instantiator instantiator,
@NonNull NamedDomainObjectContainer<T> buildTypes,
@NonNull NamedDomainObjectContainer<PatchConfig> patchConfigs,
@NonNull NamedDomainObjectContainer<DexConfig>dexConfigs) {
logger = Logging.getLogger(this.getClass());
this.project = project;
this.patchConfigs = patchConfigs;
this.dexConfigs = dexConfigs;
this.buildTypes = buildTypes;
this.multiDexConfigs = project.container(MultiDexConfig.class, new MultiDexConfigFactory(
instantiator,project, project.getLogger()));
tBuildConfig = (Z) instantiator.newInstance(TBuildConfig.class);
manifestOptions = instantiator.newInstance(ManifestOptions.class);
bundleConfig = instantiator.newInstance(BundleConfig.class);
}
开发者ID:alibaba,项目名称:atlas,代码行数:20,代码来源:AtlasExtension.java
示例2: TaskManager
import org.gradle.api.logging.Logging; //导入依赖的package包/类
public TaskManager(
Project project,
AndroidBuilder androidBuilder,
AndroidConfig extension,
SdkHandler sdkHandler,
DependencyManager dependencyManager,
ToolingModelBuilderRegistry toolingRegistry) {
this.project = project;
this.androidBuilder = androidBuilder;
this.sdkHandler = sdkHandler;
this.extension = extension;
this.toolingRegistry = toolingRegistry;
this.dependencyManager = dependencyManager;
logger = Logging.getLogger(this.getClass());
globalScope = new GlobalScope(
project,
androidBuilder,
(String) project.getProperties().get("archivesBaseName"),
extension,
sdkHandler,
toolingRegistry);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:TaskManager.java
示例3: toGradleLogLevel
import org.gradle.api.logging.Logging; //导入依赖的package包/类
/**
* Maps a Logback log level and optional marker to a Gradle log level.
* Returns null if there is no equivalent Gradle log level (such as for TRACE).
*/
@Nullable
public static LogLevel toGradleLogLevel(Level level, @Nullable Marker marker) {
switch(level.toInt()) {
case Level.TRACE_INT:
return null;
case Level.DEBUG_INT:
return LogLevel.DEBUG;
case Level.INFO_INT:
if (marker == Logging.LIFECYCLE) {
return LogLevel.LIFECYCLE;
}
if (marker == Logging.QUIET) {
return LogLevel.QUIET;
}
return LogLevel.INFO;
case Level.WARN_INT:
return LogLevel.WARN;
case Level.ERROR_INT:
return LogLevel.ERROR;
default:
throw new IllegalArgumentException("Don't know how to map Logback log level '" + level + "' to a Gradle log level");
}
}
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:28,代码来源:LogLevelConverter.java
示例4: messageLogged
import org.gradle.api.logging.Logging; //导入依赖的package包/类
public void messageLogged(BuildEvent event) {
final StringBuffer message = new StringBuffer();
if (event.getTask() != null) {
String taskName = event.getTask().getTaskName();
message.append("[ant:").append(taskName).append("] ");
}
final String messageText = event.getMessage();
message.append(messageText);
LogLevel level = Logging.ANT_IVY_2_SLF4J_LEVEL_MAPPER.get(event.getPriority());
if (event.getException() != null) {
logger.log(level, message.toString(), event.getException());
} else {
logger.log(level, message.toString());
}
}
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:18,代码来源:AntLoggingAdapter.java
示例5: toLogLevel
import org.gradle.api.logging.Logging; //导入依赖的package包/类
private LogLevel toLogLevel(Marker marker) {
if (marker == null) {
return LogLevel.INFO;
}
if (marker == Logging.LIFECYCLE) {
return LogLevel.LIFECYCLE;
}
if (marker == Logging.QUIET) {
return LogLevel.QUIET;
}
return LogLevel.INFO;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:OutputEventListenerBackedLogger.java
示例6: AbstractGradleExecuter
import org.gradle.api.logging.Logging; //导入依赖的package包/类
protected AbstractGradleExecuter(GradleDistribution distribution, TestDirectoryProvider testDirectoryProvider, GradleVersion gradleVersion, IntegrationTestBuildContext buildContext) {
this.distribution = distribution;
this.testDirectoryProvider = testDirectoryProvider;
this.gradleVersion = gradleVersion;
logger = Logging.getLogger(getClass());
this.buildContext = buildContext;
gradleUserHomeDir = buildContext.getGradleUserHomeDir();
daemonBaseDir = buildContext.getDaemonBaseDir();
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:AbstractGradleExecuter.java
示例7: startServer
import org.gradle.api.logging.Logging; //导入依赖的package包/类
private PlayAppLifecycleUpdate startServer() {
try {
run();
return PlayAppLifecycleUpdate.running();
} catch (Exception e) {
Logging.getLogger(this.getClass()).error("Failed to run Play", e);
return PlayAppLifecycleUpdate.failed(e);
}
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:PlayWorkerServer.java
示例8: AtlasBaseTaskManager
import org.gradle.api.logging.Logging; //导入依赖的package包/类
public AtlasBaseTaskManager(AtlasBuilder androidBuilder, T androidExtension, Project project,
AtlasExtension atlasExtension) {
this.tAndroidBuilder = androidBuilder;
this.androidExtension = androidExtension;
this.project = project;
this.tasks = new TaskContainerAdaptor(project.getTasks());
this.atlasExtension = atlasExtension;
this.extraModelInfo = new ExtraModelInfo(project);
this.logger = new LoggerWrapper(Logging.getLogger(AtlasBaseTaskManager.class));
//this.dependencyManager = new DependencyManager(androidExtension, project, atlasExtension);
}
开发者ID:alibaba,项目名称:atlas,代码行数:13,代码来源:AtlasBaseTaskManager.java
示例9: DependencyManager
import org.gradle.api.logging.Logging; //导入依赖的package包/类
public DependencyManager(
@NonNull Project project,
@NonNull ExtraModelInfo extraModelInfo,
@NonNull SdkHandler sdkHandler) {
this.project = project;
this.extraModelInfo = extraModelInfo;
this.sdkHandler = sdkHandler;
logger = new LoggerWrapper(Logging.getLogger(DependencyManager.class));
}
开发者ID:alibaba,项目名称:atlas,代码行数:10,代码来源:DependencyManager.java
示例10: doNewInstance
import org.gradle.api.logging.Logging; //导入依赖的package包/类
private DefaultGradleLauncher doNewInstance(StartParameter startParameter, GradleLauncher parent,
BuildCancellationToken cancellationToken, BuildRequestMetaData requestMetaData, BuildEventConsumer buildEventConsumer, final BuildSessionScopeServices sessionScopeServices, List<?> servicesToStop) {
BuildScopeServices serviceRegistry = BuildScopeServices.forSession(sessionScopeServices);
serviceRegistry.add(BuildRequestMetaData.class, requestMetaData);
serviceRegistry.add(BuildClientMetaData.class, requestMetaData.getClient());
serviceRegistry.add(BuildEventConsumer.class, buildEventConsumer);
serviceRegistry.add(BuildCancellationToken.class, cancellationToken);
NestedBuildFactoryImpl nestedBuildFactory = new NestedBuildFactoryImpl(sessionScopeServices);
serviceRegistry.add(NestedBuildFactory.class, nestedBuildFactory);
ListenerManager listenerManager = serviceRegistry.get(ListenerManager.class);
LoggingManagerInternal loggingManager = serviceRegistry.newInstance(LoggingManagerInternal.class);
loggingManager.setLevelInternal(startParameter.getLogLevel());
//this hooks up the ListenerManager and LoggingConfigurer so you can call Gradle.addListener() with a StandardOutputListener.
loggingManager.addStandardOutputListener(listenerManager.getBroadcaster(StandardOutputListener.class));
loggingManager.addStandardErrorListener(listenerManager.getBroadcaster(StandardOutputListener.class));
LoggerProvider loggerProvider = (parent == null) ? buildProgressLogger : LoggerProvider.NO_OP;
listenerManager.useLogger(new TaskExecutionLogger(serviceRegistry.get(ProgressLoggerFactory.class), loggerProvider));
if (parent == null) {
listenerManager.useLogger(new BuildLogger(Logging.getLogger(BuildLogger.class), serviceRegistry.get(StyledTextOutputFactory.class), startParameter, requestMetaData));
}
if (startParameter.isTaskOutputCacheEnabled()) {
listenerManager.addListener(serviceRegistry.get(TaskExecutionStatisticsEventAdapter.class));
listenerManager.addListener(new CacheStatisticsReporter(serviceRegistry.get(StyledTextOutputFactory.class)));
}
listenerManager.addListener(serviceRegistry.get(ProfileEventAdapter.class));
if (startParameter.isProfile()) {
listenerManager.addListener(new ReportGeneratingProfileListener());
}
ScriptUsageLocationReporter usageLocationReporter = new ScriptUsageLocationReporter();
listenerManager.addListener(usageLocationReporter);
ShowStacktrace showStacktrace = startParameter.getShowStacktrace();
switch (showStacktrace) {
case ALWAYS:
case ALWAYS_FULL:
LoggingDeprecatedFeatureHandler.setTraceLoggingEnabled(true);
break;
default:
LoggingDeprecatedFeatureHandler.setTraceLoggingEnabled(false);
}
DeprecationLogger.useLocationReporter(usageLocationReporter);
SettingsLoaderFactory settingsLoaderFactory = serviceRegistry.get(SettingsLoaderFactory.class);
SettingsLoader settingsLoader = parent != null ? settingsLoaderFactory.forNestedBuild() : settingsLoaderFactory.forTopLevelBuild();
GradleInternal parentBuild = parent == null ? null : parent.getGradle();
GradleInternal gradle = serviceRegistry.get(Instantiator.class).newInstance(DefaultGradle.class, parentBuild, startParameter, serviceRegistry.get(ServiceRegistryFactory.class));
DefaultGradleLauncher gradleLauncher = new DefaultGradleLauncher(
gradle,
serviceRegistry.get(InitScriptHandler.class),
settingsLoader,
serviceRegistry.get(BuildConfigurer.class),
serviceRegistry.get(ExceptionAnalyser.class),
loggingManager,
gradle.getBuildListenerBroadcaster(),
listenerManager.getBroadcaster(ModelConfigurationListener.class),
listenerManager.getBroadcaster(BuildCompletionListener.class),
serviceRegistry.get(BuildOperationExecutor.class),
gradle.getServices().get(BuildConfigurationActionExecuter.class),
gradle.getServices().get(BuildExecuter.class),
serviceRegistry,
globalListenerManager,
servicesToStop
);
nestedBuildFactory.setParent(gradleLauncher);
return gradleLauncher;
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:72,代码来源:DefaultGradleLauncherFactory.java
示例11: DefaultBuildOperationLoggerFactory
import org.gradle.api.logging.Logging; //导入依赖的package包/类
public DefaultBuildOperationLoggerFactory() {
this(Logging.getLogger(DefaultBuildOperationLoggerFactory.class));
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultBuildOperationLoggerFactory.java
示例12: DummyRewriter
import org.gradle.api.logging.Logging; //导入依赖的package包/类
public DummyRewriter() {
_log = Logging.getLogger(DummyRewriter.class.getSimpleName());
}
开发者ID:rakutentech,项目名称:android-perftracking,代码行数:4,代码来源:DummyRewriter.java
示例13: PerformanceTrackingRewriter
import org.gradle.api.logging.Logging; //导入依赖的package包/类
public PerformanceTrackingRewriter() {
_log = Logging.getLogger(PerformanceTrackingRewriter.class.getSimpleName());
}
开发者ID:rakutentech,项目名称:android-perftracking,代码行数:4,代码来源:PerformanceTrackingRewriter.java
示例14: AbstractProjectConfigPlugin
import org.gradle.api.logging.Logging; //导入依赖的package包/类
/**
* Create a new plugin
*/
public AbstractProjectConfigPlugin() {
this.logger = Logging.getLogger(getClass());
}
开发者ID:jochenseeber,项目名称:gradle-project-config,代码行数:7,代码来源:AbstractProjectConfigPlugin.java
示例15: DependencyManager
import org.gradle.api.logging.Logging; //导入依赖的package包/类
public DependencyManager(Project project, ExtraModelInfo extraModelInfo) {
this.project = project;
this.extraModelInfo = extraModelInfo;
logger = new LoggerWrapper(Logging.getLogger(DependencyManager.class));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:DependencyManager.java
示例16: AbstractGradleExecuter
import org.gradle.api.logging.Logging; //导入依赖的package包/类
protected AbstractGradleExecuter(GradleDistribution distribution, TestDirectoryProvider testDirectoryProvider) {
this.distribution = distribution;
this.testDirectoryProvider = testDirectoryProvider;
logger = Logging.getLogger(getClass());
}
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:6,代码来源:AbstractGradleExecuter.java
示例17: log
import org.gradle.api.logging.Logging; //导入依赖的package包/类
public void log(String msg, int level) {
logger.log(Logging.ANT_IVY_2_SLF4J_LEVEL_MAPPER.get(level), msg);
}
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:4,代码来源:IvyLoggingAdaper.java
示例18: doNewInstance
import org.gradle.api.logging.Logging; //导入依赖的package包/类
private DefaultGradleLauncher doNewInstance(StartParameter startParameter, BuildCancellationToken cancellationToken, BuildRequestMetaData requestMetaData) {
final BuildScopeServices serviceRegistry = new BuildScopeServices(sharedServices, startParameter);
serviceRegistry.add(BuildRequestMetaData.class, requestMetaData);
serviceRegistry.add(BuildClientMetaData.class, requestMetaData.getClient());
serviceRegistry.add(BuildCancellationToken.class, cancellationToken);
ListenerManager listenerManager = serviceRegistry.get(ListenerManager.class);
LoggingManagerInternal loggingManager = serviceRegistry.newInstance(LoggingManagerInternal.class);
loggingManager.setLevel(startParameter.getLogLevel());
//this hooks up the ListenerManager and LoggingConfigurer so you can call Gradle.addListener() with a StandardOutputListener.
loggingManager.addStandardOutputListener(listenerManager.getBroadcaster(StandardOutputListener.class));
loggingManager.addStandardErrorListener(listenerManager.getBroadcaster(StandardOutputListener.class));
LoggerProvider loggerProvider = (tracker.getCurrentBuild() == null) ? buildProgressLogger : LoggerProvider.NO_OP;
listenerManager.useLogger(new TaskExecutionLogger(serviceRegistry.get(ProgressLoggerFactory.class), loggerProvider));
if (tracker.getCurrentBuild() == null) {
listenerManager.useLogger(new BuildLogger(Logging.getLogger(BuildLogger.class), serviceRegistry.get(StyledTextOutputFactory.class), startParameter, requestMetaData));
}
listenerManager.addListener(tracker);
listenerManager.addListener(serviceRegistry.get(ProfileEventAdapter.class));
if (startParameter.isProfile()) {
listenerManager.addListener(new ReportGeneratingProfileListener());
}
ScriptUsageLocationReporter usageLocationReporter = new ScriptUsageLocationReporter();
listenerManager.addListener(usageLocationReporter);
DeprecationLogger.useLocationReporter(usageLocationReporter);
GradleInternal gradle = serviceRegistry.get(Instantiator.class).newInstance(DefaultGradle.class, tracker.getCurrentBuild(), startParameter, serviceRegistry.get(ServiceRegistryFactory.class));
return new DefaultGradleLauncher(
gradle,
serviceRegistry.get(InitScriptHandler.class),
new SettingsHandler(
new DefaultSettingsFinder(
new BuildLayoutFactory()),
serviceRegistry.get(SettingsProcessor.class),
new BuildSourceBuilder(
this,
cancellationToken,
serviceRegistry.get(ClassLoaderScopeRegistry.class).getCoreAndPluginsScope(),
serviceRegistry.get(CacheRepository.class))
),
serviceRegistry.get(BuildLoader.class),
serviceRegistry.get(BuildConfigurer.class),
gradle.getBuildListenerBroadcaster(),
serviceRegistry.get(ExceptionAnalyser.class),
loggingManager,
listenerManager.getBroadcaster(ModelConfigurationListener.class),
listenerManager.getBroadcaster(TasksCompletionListener.class),
gradle.getServices().get(BuildExecuter.class),
listenerManager.getBroadcaster(BuildCompletionListener.class),
serviceRegistry
);
}
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:55,代码来源:DefaultGradleLauncherFactory.java
示例19: doNewInstance
import org.gradle.api.logging.Logging; //导入依赖的package包/类
private DefaultGradleLauncher doNewInstance(StartParameter startParameter, BuildRequestMetaData requestMetaData) {
final BuildScopeServices serviceRegistry = new BuildScopeServices(sharedServices, startParameter);
serviceRegistry.add(BuildRequestMetaData.class, requestMetaData);
serviceRegistry.add(BuildClientMetaData.class, requestMetaData.getClient());
ListenerManager listenerManager = serviceRegistry.get(ListenerManager.class);
LoggingManagerInternal loggingManager = serviceRegistry.newInstance(LoggingManagerInternal.class);
loggingManager.setLevel(startParameter.getLogLevel());
//this hooks up the ListenerManager and LoggingConfigurer so you can call Gradle.addListener() with a StandardOutputListener.
loggingManager.addStandardOutputListener(listenerManager.getBroadcaster(StandardOutputListener.class));
loggingManager.addStandardErrorListener(listenerManager.getBroadcaster(StandardOutputListener.class));
LoggerProvider loggerProvider = (tracker.getCurrentBuild() == null)? buildProgressLogger: LoggerProvider.NO_OP;
listenerManager.useLogger(new TaskExecutionLogger(serviceRegistry.get(ProgressLoggerFactory.class), loggerProvider));
if (tracker.getCurrentBuild() == null) {
listenerManager.useLogger(new BuildLogger(Logging.getLogger(BuildLogger.class), serviceRegistry.get(StyledTextOutputFactory.class), startParameter, requestMetaData));
}
listenerManager.addListener(tracker);
listenerManager.addListener(new BuildCleanupListener(serviceRegistry));
listenerManager.addListener(serviceRegistry.get(ProfileEventAdapter.class));
if (startParameter.isProfile()) {
listenerManager.addListener(new ReportGeneratingProfileListener());
}
ScriptUsageLocationReporter usageLocationReporter = new ScriptUsageLocationReporter();
listenerManager.addListener(usageLocationReporter);
DeprecationLogger.useLocationReporter(usageLocationReporter);
GradleInternal gradle = serviceRegistry.get(Instantiator.class).newInstance(DefaultGradle.class, tracker.getCurrentBuild(), startParameter, serviceRegistry.get(ServiceRegistryFactory.class));
return new DefaultGradleLauncher(
gradle,
serviceRegistry.get(InitScriptHandler.class),
new SettingsHandler(
new DefaultSettingsFinder(
new BuildLayoutFactory()),
serviceRegistry.get(SettingsProcessor.class),
new BuildSourceBuilder(
this,
serviceRegistry.get(ClassLoaderScope.class),
serviceRegistry.get(CacheRepository.class))),
serviceRegistry.get(BuildLoader.class),
serviceRegistry.get(BuildConfigurer.class),
gradle.getBuildListenerBroadcaster(),
serviceRegistry.get(ExceptionAnalyser.class),
loggingManager,
listenerManager.getBroadcaster(ModelConfigurationListener.class),
listenerManager.getBroadcaster(TasksCompletionListener.class),
gradle.getServices().get(BuildExecuter.class));
}
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:50,代码来源:DefaultGradleLauncherFactory.java
示例20: WorkspacePlugin
import org.gradle.api.logging.Logging; //导入依赖的package包/类
/**
* Create a new workspace plugin
*/
@Inject
public WorkspacePlugin() {
this.logger = Logging.getLogger(getClass());
}
开发者ID:jochenseeber,项目名称:gradle-workspace-plugin,代码行数:8,代码来源:WorkspacePlugin.java
注:本文中的org.gradle.api.logging.Logging类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论