java - Create a hyperlink to a project file in console output -


is there way me write out link console output when clicked on directs project file in intellij?

for example, happens when run-time exception occurs. see stack trace , can click on link in console directs me problem was. here can click on databaseconfiguration.java , redirected file in intellij. enter image description here

what want output link readme.txt file written console when main starts up. when clicked on opens readme.txt in intellij.

i using log4j , directing output console, may affect solution. here conversion pattern:

log4j.appender.file.layout.conversionpattern=%d{hh:mm:ss,sss} %-5p [%c] %m%n 

idea create link in console text matches following pattern:

(${filename}.${fileextention}:${linenum}) 

or regex:

\([\w \.\-]+\.[\w]*:[\d]+\) 

for example: (errornotes.txt:10)

note need include parenthesis. actual class, use following in log4j pattern: (%f:%l) example: reference class, or file, have output actual file name, extension, , line number, inside parenthesis, since log4j can access info current class. example:

logger.error("a fluxcapacitorexcpetion #88 has occurred. see (error details.txt:542) more details.") 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -