Skip to content

Commit

Permalink
log fileID instead of file
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshihorie committed Oct 3, 2023
1 parent 697e432 commit caf1e4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/LiveKit/Core/Room.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public class Room: NSObject, ObservableObject, Loggable {
// metadata updated
if let metadata = newState.metadata, metadata != oldState.metadata,
// don't notify if empty string (first time only)
(oldState.metadata == nil ? !metadata.isEmpty : true) {
oldState.metadata == nil ? !metadata.isEmpty : true {

// proceed only if connected...
self.engine.executeIfConnected { [weak self] in
Expand Down
4 changes: 2 additions & 2 deletions Sources/LiveKit/Extensions/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public extension Loggable {
/// Automatically captures current type (class name) to ``Logger.Metadata``
internal func log(_ message: Logger.Message? = nil,
_ level: Logger.Level = .debug,
file: String = #file,
file: String = #fileID,
type type_: Any.Type? = nil,
function: String = #function,
line: UInt = #line) {
Expand All @@ -64,7 +64,7 @@ internal extension Logger {
func log(_ message: Logger.Message,
_ level: Logger.Level = .debug,
source: @autoclosure () -> String? = nil,
file: String = #file,
file: String = #fileID,
type: Any.Type,
function: String = #function,
line: UInt = #line,
Expand Down
2 changes: 1 addition & 1 deletion Sources/LiveKit/Participant/Participant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class Participant: NSObject, ObservableObject, Loggable {
// metadata updated
if let metadata = newState.metadata, metadata != oldState.metadata,
// don't notify if empty string (first time only)
(oldState.metadata == nil ? !metadata.isEmpty : true) {
oldState.metadata == nil ? !metadata.isEmpty : true {

self.delegates.notify(label: { "participant.didUpdate metadata: \(metadata)" }) {
$0.participant?(self, didUpdate: metadata)
Expand Down

0 comments on commit caf1e4e

Please sign in to comment.