Questions tagged [logback-groovy]

A Groovy DSL that provides an alternative to XML for configuring Logback.

A Groovy DSL that provides an alternative to XML for configuring Logback.

42 questions
14
votes
3 answers

logback how to set destination folder for log files

Is there a way to set a single destination folder, such that I can specify where all log files should be created rather than having to set it on an appender by appender basis?
user79074
  • 4,937
  • 5
  • 29
  • 57
8
votes
4 answers

Why does stacktrace.log not fill with logback in grails 3?

When you create a new grails application, the default logback.groovy file (and almost every example of a logback.groovy, even Mr Haki's example) contains the following code, which I have simplified to focus on the relevant piece: root(ERROR,…
Ryan Heathcote
  • 836
  • 8
  • 19
8
votes
1 answer

Spring boot + Groovy + logback.groovy

I am mixing Groovy and Java in my Spring-boot application. Rest controllers and data access is written in Groovy. Configurations are mainly in Java. As per logback documentation, if there is a logback.groovy file in the classpath, it's supposed to…
Sree
  • 746
  • 6
  • 21
5
votes
2 answers

exception in logback when ansi coding for console display on windows 10 64bit

Can't quite find an answer to this, can anyone state a fix. I have a library jar i'm building and using logback (logabck 1.2.3, jansi 1.16) and groovy, and i'm trying to colour code the log display - as spring boot manages to do - but i didn't…
WILLIAM WOODMAN
  • 1,185
  • 5
  • 19
  • 36
4
votes
1 answer

Logback giving error Cannot cast object '3 gb' with class 'java.lang.String' to class 'ch.qos.logback.core.util.FileSize'

I have a springboot application and while trying to log using logback with groovy config I am getting following error: Failed to instantiate [ch.qos.logback.classic.LoggerContext] Reported…
Koustav Ray
  • 1,112
  • 13
  • 26
3
votes
1 answer

Logback: Enable shutdownHook using Groovy configuration

I'm using logback 1.1.10 with groovy configuration. I recently discovered shutdownHook preference but I haven't found the way to enable it using groovy configuration. Is this possible? Or a missing feature?
guindous
  • 41
  • 4
3
votes
1 answer

Grails 3: External Logback.groovy file

I'm trying to externalize my logback.groovy file by setting the path in my build.gradle file in the bootrun closure: bootRun { if (Environment.currentEnvironment == Environment.PRODUCTION) { jvmArgs = ['-XX:MaxPermSize=2g', '-Xmx2g',…
matt_roo
  • 415
  • 3
  • 14
3
votes
1 answer

Configure play framework logging with logback.groovy

Is it possible to configure the 2.5 PlayFramework logging using a logback.groovy instead of a logback.xml? I have logback.groovy on my classpath. I know this is valid, because it is initially loaded without errors and even creates empty log…
Troy Daniels
  • 3,270
  • 2
  • 25
  • 57
3
votes
0 answers

No logs from Grails 3.x application under Tomcat

I have Grails 3.x application. It runs well on development machine and it's logging level in grails-app/conf/logback.groovy is set to INFO Unfortunately, when I run on production server there are no any word from my application in logs. I found…
Dims
  • 47,675
  • 117
  • 331
  • 600
3
votes
1 answer

Does logback need groovy.jar or groovy-all.jar?

I'm looking to minimize the size of my software distribution, and groovy-all.jar is by far the biggest JAR. Groovy is used for logback configuration[1]. On the bottom of the Groovy download page there's a section on the split Groovy…
Frank Kusters
  • 2,544
  • 2
  • 21
  • 30
2
votes
2 answers

How to activate the "Logback setup" debug mode using groovy configuration file?

I would like to activate the logback internal devbug mode (to get more information during the logback setup). I know how to do this in xml file (using a debug="true" in the configuration declaration). I discovered that it could be possible to force…
Jeremy L
  • 251
  • 1
  • 3
  • 12
2
votes
1 answer

Is there a way to inject a Grails datasource into logback.groovy for use with DBAppender?

So, Grails already sets up datasources backed by connection pools. Is there a way to leverage those for use with DBAppender in Logback so that I don't have to create a separate parallel datasource/connection pool? logback.groovy is somewhat external…
U47
  • 193
  • 14
2
votes
0 answers

Variable substitution from external resource in logback groovy configuration

Logback's XML configuration allows you easily define variables in external resources with as spelled out in http://logback.qos.ch/manual/configuration.html#variableSubstitution. I'm in the process of converting…
JCoster22
  • 387
  • 5
  • 9
2
votes
1 answer

Configure logback from groovy script

I have a Java library, on top of which I have lightweight groovy scripts that function as terminal-based command-line utilities. So rather than asking my users to java -cp ... com.foo.bar.package.SomeMainClass ... They have access to a "standard"…
dgorur
  • 1,638
  • 4
  • 16
  • 26
2
votes
1 answer

LogBack, How to disable in certain environments

I am using the Logback logging for my application, but I want certain logs to not be used based on the environment. For example, I have
Teddy Dong
  • 362
  • 1
  • 6
  • 20
1
2 3