# LogAction

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactions-custom/struct-logaction/

**struct** · [`ferroui-xaml-interactions-custom`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/) · v0.5.0

```rust
struct LogAction
```

An action that logs a message to the debug output.

Deviation (DEVIATIONS.md, Behaviors): the reference writes the message to the trace listeners
(`Trace.TraceInformation`, `TraceWarning`, `TraceError`, `Debug.WriteLine`) and to the console.
The port writes it to the log sink of the framework (`Logger`, area `LogAction`, at the level
of `level`) and to the standard output. The message is formatted as
`string.Format(message, argument)` does with one argument (`{0}`, its alignment, `{{` and
`}}`); the format string of the item (`{0:N2}`) is not applied, the text form of the argument
is used.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L55)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`message_property`](#function-message_property)
- [`argument_property`](#function-argument_property)
- [`level_property`](#function-level_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`message`](#function-message)
- [`set_message`](#function-set_message)
- [`argument`](#function-argument)
- [`set_argument`](#function-set_argument)
- [`level`](#function-level)
- [`set_level`](#function-set_level)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L59)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<LogAction>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L59)

<a id="function-message_property"></a>

### message_property

```rust
fn message_property() -> &'static StyledProperty<Option<String>>
```

Identifies the `Message` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L63)

<a id="function-argument_property"></a>

### argument_property

```rust
fn argument_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Identifies the `Argument` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L63)

<a id="function-level_property"></a>

### level_property

```rust
fn level_property() -> &'static StyledProperty<LogActionLevel>
```

Identifies the `Level` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L63)

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L127)

<a id="function-new"></a>

### new

```rust
fn new() -> Ref<Self>
```

Creates an action.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L132)

<a id="function-message"></a>

### message

```rust
fn message(self: &Self) -> Option<String>
```

Gets or sets the message format string.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L137)

<a id="function-set_message"></a>

### set_message

```rust
fn set_message(self: &Self, value: Option<String>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L141)

<a id="function-argument"></a>

### argument

```rust
fn argument(self: &Self) -> Option<BoxedValue>
```

Gets or sets an optional argument to format the message with.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L146)

<a id="function-set_argument"></a>

### set_argument

```rust
fn set_argument(self: &Self, value: Option<BoxedValue>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L150)

<a id="function-level"></a>

### level

```rust
fn level(self: &Self) -> LogActionLevel
```

Gets or sets the log level.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L155)

<a id="function-set_level"></a>

### set_level

```rust
fn set_level(self: &Self, value: LogActionLevel)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/debugging/log_action.rs#L159)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`StyledElementActionImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementactionimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<LogAction>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`StyledElementActionImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementactionimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
