package logger

Import Path
	github.com/evanw/esbuild/internal/logger (on go.dev)

Dependency Relation
	imports 9 packages, and imported by 14 packages

Involved Source Files logger.go logger_darwin.go
Package-Level Type Names (total 19, all are exported)
/* sort exporteds by: | */
This is the 0-based index of this location from the start of the file, in bytes func github.com/evanw/esbuild/internal/js_lexer.(*Lexer).Loc() Loc func Log.AddError(source *Source, loc Loc, text string) func Log.AddErrorWithNotes(source *Source, loc Loc, text string, notes []MsgData) func Log.AddWarning(source *Source, loc Loc, text string) func (*Source).RangeOfLegacyOctalEscape(loc Loc) (r Range) func (*Source).RangeOfNumber(loc Loc) (r Range) func (*Source).RangeOfOperatorAfter(loc Loc, op string) Range func (*Source).RangeOfOperatorBefore(loc Loc, op string) Range func (*Source).RangeOfString(loc Loc) Range func github.com/evanw/esbuild/internal/js_lexer.RangeOfIdentifier(source Source, loc Loc) Range
AddMsg func(Msg) This is called after the build has finished but before writing to stdout. It exists to ensure that deferred warning messages end up in the terminal before the data written to stdout. Done func() []Msg HasErrors func() bool ( T) AddError(source *Source, loc Loc, text string) ( T) AddErrorWithNotes(source *Source, loc Loc, text string, notes []MsgData) ( T) AddRangeError(source *Source, r Range, text string) ( T) AddRangeErrorWithNotes(source *Source, r Range, text string, notes []MsgData) ( T) AddRangeWarning(source *Source, r Range, text string) ( T) AddRangeWarningWithNotes(source *Source, r Range, text string, notes []MsgData) ( T) AddWarning(source *Source, loc Loc, text string) func NewDeferLog() Log func NewStderrLog(options OutputOptions) Log func github.com/evanw/esbuild/internal/bundler.ScanBundle(log Log, fs fs.FS, res resolver.Resolver, caches *cache.CacheSet, entryPoints []string, options config.Options) bundler.Bundle func github.com/evanw/esbuild/internal/bundler.(*Bundle).Compile(log Log, options config.Options) []bundler.OutputFile func github.com/evanw/esbuild/internal/cache.(*CSSCache).Parse(log Log, source Source, options css_parser.Options) css_ast.AST func github.com/evanw/esbuild/internal/cache.(*JSCache).Parse(log Log, source Source, options js_parser.Options) (js_ast.AST, bool) func github.com/evanw/esbuild/internal/cache.(*JSONCache).Parse(log Log, source Source, options js_parser.JSONOptions) (js_ast.Expr, bool) func github.com/evanw/esbuild/internal/css_lexer.Tokenize(log Log, source Source) (tokens []css_lexer.Token) func github.com/evanw/esbuild/internal/css_parser.Parse(log Log, source Source, options css_parser.Options) css_ast.AST func github.com/evanw/esbuild/internal/js_lexer.NewLexer(log Log, source Source) js_lexer.Lexer func github.com/evanw/esbuild/internal/js_lexer.NewLexerGlobalName(log Log, source Source) js_lexer.Lexer func github.com/evanw/esbuild/internal/js_lexer.NewLexerJSON(log Log, source Source, allowComments bool) js_lexer.Lexer func github.com/evanw/esbuild/internal/js_parser.LazyExportAST(log Log, source Source, options js_parser.Options, expr js_ast.Expr, apiCall string) js_ast.AST func github.com/evanw/esbuild/internal/js_parser.Parse(log Log, source Source, options js_parser.Options) (result js_ast.AST, ok bool) func github.com/evanw/esbuild/internal/js_parser.ParseGlobalName(log Log, source Source) (result []string, ok bool) func github.com/evanw/esbuild/internal/js_parser.ParseJSON(log Log, source Source, options js_parser.JSONOptions) (result js_ast.Expr, ok bool) func github.com/evanw/esbuild/internal/js_parser.ParseSourceMap(log Log, source Source) *sourcemap.SourceMap func github.com/evanw/esbuild/internal/resolver.NewResolver(fs fs.FS, log Log, caches *cache.CacheSet, options config.Options) resolver.Resolver func github.com/evanw/esbuild/internal/resolver.ParseTSConfigJSON(log Log, source Source, jsonCache *cache.JSONCache, extends func(string, Range) *resolver.TSConfigJSON) *resolver.TSConfigJSON
func PrintText(file *os.File, level LogLevel, osArgs []string, callback func(Colors) string) const LevelError const LevelInfo const LevelNone const LevelSilent const LevelWarning
Data MsgData Kind MsgKind Notes []MsgData ( T) String(options OutputOptions, terminalInfo TerminalInfo) string func PrintMessageToStderr(osArgs []string, msg Msg)
Location *MsgLocation Text string Optional user-specified data that is passed through unmodified func RangeData(source *Source, r Range, text string) MsgData func Log.AddErrorWithNotes(source *Source, loc Loc, text string, notes []MsgData) func Log.AddRangeErrorWithNotes(source *Source, r Range, text string, notes []MsgData) func Log.AddRangeWarningWithNotes(source *Source, r Range, text string, notes []MsgData)
Column int ContentAfter string Indent string Line int Marker string Message string Path string SourceAfter string SourceBefore string SourceMarked string Suggestion string
( T) String() string T : expvar.Var T : fmt.Stringer const Error const Note const Warning
// 0-based, in bytes File string // in bytes // 1-based LineText string Namespace string Suggestion string func LocationOrNil(source *Source, r Range) *MsgLocation
Color UseColor IncludeSource bool LogLevel LogLevel MessageLimit int func OutputOptionsForArgs(osArgs []string) OutputOptions func NewStderrLog(options OutputOptions) Log func Msg.String(options OutputOptions, terminalInfo TerminalInfo) string
This is used to represent both file system paths (Namespace == "file") and abstract module paths (Namespace != "file"). Abstract module paths represent "virtual modules" when used for an input file and "package paths" when used to represent an external module. Flags PathFlags This feature was added to support ancient CSS libraries that append things like "?#iefix" and "#icons" to some of their import paths as a hack for IE6. The intent is for these suffix parts to be ignored but passed through to the output. This is supported by other bundlers, so we also support this. Namespace string Text string ( T) ComesBeforeInSortedOrder(b Path) bool ( T) IsDisabled() bool func Path.ComesBeforeInSortedOrder(b Path) bool func github.com/evanw/esbuild/internal/cache.(*SourceIndexCache).Get(path Path, kind cache.SourceIndexKind) uint32 func github.com/evanw/esbuild/internal/config.PluginAppliesToPath(path Path, filter *regexp.Regexp, namespace string) bool func github.com/evanw/esbuild/internal/resolver.Resolver.PrettyPath(path Path) string
const PathDisabled
Len int32 Loc Loc ( T) End() int32 func (*Source).RangeOfLegacyOctalEscape(loc Loc) (r Range) func (*Source).RangeOfNumber(loc Loc) (r Range) func (*Source).RangeOfOperatorAfter(loc Loc, op string) Range func (*Source).RangeOfOperatorBefore(loc Loc, op string) Range func (*Source).RangeOfString(loc Loc) Range func github.com/evanw/esbuild/internal/js_lexer.RangeOfIdentifier(source Source, loc Loc) Range func github.com/evanw/esbuild/internal/js_lexer.(*Lexer).Range() Range func LocationOrNil(source *Source, r Range) *MsgLocation func RangeData(source *Source, r Range, text string) MsgData func Log.AddRangeError(source *Source, r Range, text string) func Log.AddRangeErrorWithNotes(source *Source, r Range, text string, notes []MsgData) func Log.AddRangeWarning(source *Source, r Range, text string) func Log.AddRangeWarningWithNotes(source *Source, r Range, text string, notes []MsgData) func (*Source).TextForRange(r Range) string
This type is just so we can use Go's native sort function ( T) Len() int ( T) Less(i int, j int) bool ( T) Swap(i int, j int) T : sort.Interface
Contents string An identifier that is mixed in to automatically-generated symbol names to improve readability. For example, if the identifier is "util" then the symbol for an "export default" statement will be called "util_default". Index uint32 This is used as a unique key to identify this source file. It should never be shown to the user (e.g. never print this to the terminal). If it's marked as an absolute path, it's a platform-dependent path that includes environment-specific things such as Windows backslash path separators and potentially the user's home directory. Only use this for passing to syscalls for reading and writing to the file system. Do not include this in any output data. If it's marked as not an absolute path, it's an opaque string that is used to refer to an automatically-generated module. This is used for error messages and the metadata JSON file. This is a mostly platform-independent path. It's relative to the current working directory and always uses standard path separators. Use this for referencing a file in all output data. These paths still use the original case of the path so they may still work differently on file systems that are case-insensitive vs. case-sensitive. (*T) RangeOfLegacyOctalEscape(loc Loc) (r Range) (*T) RangeOfNumber(loc Loc) (r Range) (*T) RangeOfOperatorAfter(loc Loc, op string) Range (*T) RangeOfOperatorBefore(loc Loc, op string) Range (*T) RangeOfString(loc Loc) Range (*T) TextForRange(r Range) string func LocationOrNil(source *Source, r Range) *MsgLocation func RangeData(source *Source, r Range, text string) MsgData func Log.AddError(source *Source, loc Loc, text string) func Log.AddErrorWithNotes(source *Source, loc Loc, text string, notes []MsgData) func Log.AddRangeError(source *Source, r Range, text string) func Log.AddRangeErrorWithNotes(source *Source, r Range, text string, notes []MsgData) func Log.AddRangeWarning(source *Source, r Range, text string) func Log.AddRangeWarningWithNotes(source *Source, r Range, text string, notes []MsgData) func Log.AddWarning(source *Source, loc Loc, text string) func github.com/evanw/esbuild/internal/cache.(*CSSCache).Parse(log Log, source Source, options css_parser.Options) css_ast.AST func github.com/evanw/esbuild/internal/cache.(*JSCache).Parse(log Log, source Source, options js_parser.Options) (js_ast.AST, bool) func github.com/evanw/esbuild/internal/cache.(*JSONCache).Parse(log Log, source Source, options js_parser.JSONOptions) (js_ast.Expr, bool) func github.com/evanw/esbuild/internal/css_lexer.Tokenize(log Log, source Source) (tokens []css_lexer.Token) func github.com/evanw/esbuild/internal/css_parser.Parse(log Log, source Source, options css_parser.Options) css_ast.AST func github.com/evanw/esbuild/internal/js_lexer.NewLexer(log Log, source Source) js_lexer.Lexer func github.com/evanw/esbuild/internal/js_lexer.NewLexerGlobalName(log Log, source Source) js_lexer.Lexer func github.com/evanw/esbuild/internal/js_lexer.NewLexerJSON(log Log, source Source, allowComments bool) js_lexer.Lexer func github.com/evanw/esbuild/internal/js_lexer.RangeOfIdentifier(source Source, loc Loc) Range func github.com/evanw/esbuild/internal/js_parser.LazyExportAST(log Log, source Source, options js_parser.Options, expr js_ast.Expr, apiCall string) js_ast.AST func github.com/evanw/esbuild/internal/js_parser.Parse(log Log, source Source, options js_parser.Options) (result js_ast.AST, ok bool) func github.com/evanw/esbuild/internal/js_parser.ParseGlobalName(log Log, source Source) (result []string, ok bool) func github.com/evanw/esbuild/internal/js_parser.ParseJSON(log Log, source Source, options js_parser.JSONOptions) (result js_ast.Expr, ok bool) func github.com/evanw/esbuild/internal/js_parser.ParseSourceMap(log Log, source Source) *sourcemap.SourceMap func github.com/evanw/esbuild/internal/resolver.ParseTSConfigJSON(log Log, source Source, jsonCache *cache.JSONCache, extends func(string, Range) *resolver.TSConfigJSON) *resolver.TSConfigJSON var github.com/evanw/esbuild/internal/runtime.ES5Source var github.com/evanw/esbuild/internal/runtime.ES6Source
This type is just so we can use Go's native sort function ( T) Len() int ( T) Less(i int, j int) bool ( T) Swap(i int, j int) T : sort.Interface func PrintSummary(osArgs []string, table SummaryTable, start time.Time)
Base string Bytes int Dir string IsSourceMap bool Size string
Height int IsTTY bool UseColorEscapes bool Width int func GetTerminalInfo(file *os.File) (info TerminalInfo) func Msg.String(options OutputOptions, terminalInfo TerminalInfo) string
func PrintTextWithColor(file *os.File, useColor UseColor, callback func(Colors) string) const ColorAlways const ColorIfTerminal const ColorNever
Package-Level Functions (total 22, in which 12 are exported)
This has a custom implementation instead of using "filepath.Dir/Base/Ext" because it should work the same on Unix and Windows. These names end up in the generated output and the generated output should not depend on the OS.
func PrintSummary(osArgs []string, table SummaryTable, start time.Time)
func PrintText(file *os.File, level LogLevel, osArgs []string, callback func(Colors) string)
func PrintTextWithColor(file *os.File, useColor UseColor, callback func(Colors) string)
Package-Level Constants (total 27, in which 13 are exported)
This corresponds to a value of "false' in the "browser" package.json field