Logtalk reference manual
Built-in method: print_message/3
Contents > Reference Manual > Built-in Methods > print_message/3

## print_message/3

#### Description

    print_message(Kind, Component, Term)

Built-in method for printing a message represented by a term, which is converted to the message text using the `logtalk::message_tokens(Term, Component)` hook predicate. This method is declared in the `logtalk` built-in object as a public predicate. The line prefix and the output stream used for each `Kind-Component` pair can be found using the `logtalk::message_prefix_stream(Kind, Component, Prefix, Stream)` hook predicate.

This predicate starts by converting the message term to a list of tokens and by calling the `logtalk::message_hook(Message, Kind, Component, Tokens)` hook predicate. If this predicate succeeds, the `print_message/3` predicate assumes that the message have been successfully printed.

#### Template and modes

    print_message(+nonvar, +atom, +nonvar)

#### Errors

`(none)`

#### Examples

    ..., logtalk::print_message(information, core, redefining_entity(object, foo)), ...