mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -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)
|
||||
private val logLines = ConcurrentHashMap<CharSequence, ArrayList<LogLine>>()
|
||||
|
||||
private val runningProjects = ConcurrentLinkedQueue<CharSequence>()
|
||||
private val runningProjects = ConcurrentLinkedQueue<String>()
|
||||
var startTime: Long? = null
|
||||
|
||||
fun onProjectStarted(name: String) {
|
||||
if (startTime == null) {
|
||||
startTime = System.currentTimeMillis()
|
||||
}
|
||||
if (! runningProjects.contains(name)) {
|
||||
runningProjects.add(name)
|
||||
logLines[name] = arrayListOf()
|
||||
}
|
||||
runningProjects.add(name)
|
||||
logLines[name] = arrayListOf()
|
||||
if (currentName == null) {
|
||||
currentName = name
|
||||
}
|
||||
|
@ -76,7 +74,7 @@ class ParallelLogger @Inject constructor(val args: Args) : ILogger {
|
|||
}
|
||||
|
||||
val LOCK = Any()
|
||||
var currentName: CharSequence? = null
|
||||
var currentName: String? = null
|
||||
set(newName) {
|
||||
field = newName
|
||||
}
|
||||
|
@ -121,9 +119,6 @@ class ParallelLogger @Inject constructor(val args: Args) : ILogger {
|
|||
if (args.sequential) {
|
||||
kobaltLog(level, message, newLine)
|
||||
} else {
|
||||
if (! runningProjects.contains(tag)) {
|
||||
runningProjects.add(tag)
|
||||
}
|
||||
addLogLine(tag, LogLine(tag, level, message, Type.LOG, newLine))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue