1

We went with the same issue in os_log Using os_log to log function arguments, or other dynamic data so here we go again:

let intervalId = "GetCategoriesUseCase"
let state = signposter.beginInterval(intervalId, id: signpostID)
signposter.endInterval(intervalId, state)

yields

Cannot convert value of type 'String' to expected argument type 'StaticString'

how I am supposed to provide two matching names short of copypasting the string???

koen
  • 5,383
  • 7
  • 50
  • 89
Anton Tropashko
  • 5,486
  • 5
  • 41
  • 66

1 Answers1

1

StaticString conforms to ExpressibleByStringLiteral so you can change the declaration to

let intervalId: StaticString = "GetCategoriesUseCase"
Joakim Danielson
  • 43,251
  • 5
  • 22
  • 52