Home / Function/ log() — tailwindcss Function Reference

log() — tailwindcss Function Reference

Architecture documentation for the log() function in renderer.ts from the tailwindcss codebase.

Function typescript OxideCore Scanner calls 1 called by 4

Entity Profile

Dependency Diagram

graph TD
  c3280d10_269f_8701_bd4c_48a551b9b4ae["log()"]
  d3757426_3d9a_0d83_2369_bcd1fe94ac5f["success()"]
  d3757426_3d9a_0d83_2369_bcd1fe94ac5f -->|calls| c3280d10_269f_8701_bd4c_48a551b9b4ae
  98289381_3219_727d_fea6_371f55963ac8["info()"]
  98289381_3219_727d_fea6_371f55963ac8 -->|calls| c3280d10_269f_8701_bd4c_48a551b9b4ae
  aad2b44f_7d63_9c23_fd06_f010fcd02b2b["error()"]
  aad2b44f_7d63_9c23_fd06_f010fcd02b2b -->|calls| c3280d10_269f_8701_bd4c_48a551b9b4ae
  46505461_b954_71dd_b5e0_cd81860be8ee["warn()"]
  46505461_b954_71dd_b5e0_cd81860be8ee -->|calls| c3280d10_269f_8701_bd4c_48a551b9b4ae
  6a3f8228_9c9b_2250_dbb5_c6512f68df39["wordWrap()"]
  c3280d10_269f_8701_bd4c_48a551b9b4ae -->|calls| 6a3f8228_9c9b_2250_dbb5_c6512f68df39
  style c3280d10_269f_8701_bd4c_48a551b9b4ae fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/utils/renderer.ts lines 92–106

function log(message: string, { art = pc.gray('\u2502'), prefix = '', print = eprintln }) {
  let prefixLength = prefix.length
  let padding = ' '
  let paddingLength = padding.length
  let artLength = stripVTControlCharacters(art).length
  let availableWidth = process.stderr.columns
  let totalWidth = availableWidth - prefixLength - paddingLength * 2 - artLength

  wordWrap(message, totalWidth).map((line, idx) => {
    return print(
      `${art}${padding}${idx === 0 ? prefix : ' '.repeat(prefixLength)}${line}${padding}`,
    )
  })
  print()
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does log() do?
log() is a function in the tailwindcss codebase.
What does log() call?
log() calls 1 function(s): wordWrap.
What calls log()?
log() is called by 4 function(s): error, info, success, warn.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free