mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Revert "Allow ParallelLogger to log from apply()."
This reverts commit 67dd7e54e9
.
This commit is contained in:
parent
ccbfe3bd94
commit
19a782d62a
1 changed files with 4 additions and 9 deletions
|
@ -32,17 +32,15 @@ class ParallelLogger @Inject constructor(val args: Args) : ILogger {
|
||||||
val newLine: Boolean)
|
val newLine: Boolean)
|
||||||
private val logLines = ConcurrentHashMap<CharSequence, ArrayList<LogLine>>()
|
private val logLines = ConcurrentHashMap<CharSequence, ArrayList<LogLine>>()
|
||||||
|
|
||||||
private val runningProjects = ConcurrentLinkedQueue<CharSequence>()
|
private val runningProjects = ConcurrentLinkedQueue<String>()
|
||||||
var startTime: Long? = null
|
var startTime: Long? = null
|
||||||
|
|
||||||
fun onProjectStarted(name: String) {
|
fun onProjectStarted(name: String) {
|
||||||
if (startTime == null) {
|
if (startTime == null) {
|
||||||
startTime = System.currentTimeMillis()
|
startTime = System.currentTimeMillis()
|
||||||
}
|
}
|
||||||
if (! runningProjects.contains(name)) {
|
|
||||||
runningProjects.add(name)
|
runningProjects.add(name)
|
||||||
logLines[name] = arrayListOf()
|
logLines[name] = arrayListOf()
|
||||||
}
|
|
||||||
if (currentName == null) {
|
if (currentName == null) {
|
||||||
currentName = name
|
currentName = name
|
||||||
}
|
}
|
||||||
|
@ -76,7 +74,7 @@ class ParallelLogger @Inject constructor(val args: Args) : ILogger {
|
||||||
}
|
}
|
||||||
|
|
||||||
val LOCK = Any()
|
val LOCK = Any()
|
||||||
var currentName: CharSequence? = null
|
var currentName: String? = null
|
||||||
set(newName) {
|
set(newName) {
|
||||||
field = newName
|
field = newName
|
||||||
}
|
}
|
||||||
|
@ -121,9 +119,6 @@ class ParallelLogger @Inject constructor(val args: Args) : ILogger {
|
||||||
if (args.sequential) {
|
if (args.sequential) {
|
||||||
kobaltLog(level, message, newLine)
|
kobaltLog(level, message, newLine)
|
||||||
} else {
|
} else {
|
||||||
if (! runningProjects.contains(tag)) {
|
|
||||||
runningProjects.add(tag)
|
|
||||||
}
|
|
||||||
addLogLine(tag, LogLine(tag, level, message, Type.LOG, newLine))
|
addLogLine(tag, LogLine(tag, level, message, Type.LOG, newLine))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue