<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/arti/src/logging.rs, branch arti-v0.3.0</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v0.3.0</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v0.3.0'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2022-05-06T11:38:16Z</updated>
<entry>
<title>Disable safe-logging when logging to console.</title>
<updated>2022-05-06T11:38:16Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-05-04T13:21:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=b879125668db7416ba527793fe56e4a50a00436a'/>
<id>urn:sha1:b879125668db7416ba527793fe56e4a50a00436a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>arti: add support for safe-logging configuration</title>
<updated>2022-05-06T11:38:14Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-05-04T13:13:29Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7e34692a65c02dbcf2bb1cd330ab9665a017d52e'/>
<id>urn:sha1:7e34692a65c02dbcf2bb1cd330ab9665a017d52e</id>
<content type='text'>
Here we add a config option to disable safe logging, and ensure that
safe logging is disabled when we are formatting an error message on
exit (since we assume it's safe to write sensitive info to stderr.)
</content>
</entry>
<entry>
<title>config derive attrs: Make builders serde, and validated structs not</title>
<updated>2022-05-05T09:35:52Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-05-04T16:45:25Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=d47e94b45993162fece0d1bdfa4d3da0407a4861'/>
<id>urn:sha1:d47e94b45993162fece0d1bdfa4d3da0407a4861</id>
<content type='text'>
 * Builders additionally derive: Debug, Serialize, Deserialize.

 * Validated structs no longer derive: Serialize, Deserialize
   and all related attributes deleted.

 * As a consequence, all the `#[serde(deny_unknown_fields)]`
   are gone.  That means that right now unknown fields are totally
   ignored.  This is good for compatibility but poor for useability.
   Doing something better here is arti#417, in progress.

 * As a consequence, delete tor_dirmgr::retry::default_parallelism.
   (The default value was already duplicated into a builder attr.)
</content>
</entry>
<entry>
<title>Make LogRotation Serialize</title>
<updated>2022-05-05T09:19:29Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-05-04T17:41:35Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2c1282f537ef89389e537e849ee906cc53d0f811'/>
<id>urn:sha1:2c1282f537ef89389e537e849ee906cc53d0f811</id>
<content type='text'>
We want to be able to serialise as well as deserialise configurations.
</content>
</entry>
<entry>
<title>Change builder list API</title>
<updated>2022-05-04T12:50:10Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-05-04T12:32:35Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=4bca91271558d950092fb1ac51c1316655d293cb'/>
<id>urn:sha1:4bca91271558d950092fb1ac51c1316655d293cb</id>
<content type='text'>
The new API is (roughly) as discussed in
  https://gitlab.torproject.org/tpo/core/arti/-/issues/451

This is quite a large commit and it is not convenient to split it up.
It contains the following changes:

 * Redo the list builder and accessor macros implemnetation,
   including docs and tests.

 * Change uses of define_list_config_builder.  In each case:
   - Move the docs about the default value to the containing field.
   - Remove the other docs (which were just recapitulations, and
     are now not needed since the ListBuilder is no longer public).
   - Rewmove or replace `pub` in the define_list_builder_helper call,
     so that the builder is no longer public.
   - Change the main macro call site to use define_list_builder_helper.
   - Add a call to define_list_builder_accessors.

 * Make the module `list_builder` pub so that we have somewhere to
   put the overview documentation.

 * Consequential changes:
   - Change `outer.inner().replace(X)` to `outer.set_inner(X)`
   - Consequential changes to imports (`use` statements).
</content>
</entry>
<entry>
<title>Document defaults for all the config lists</title>
<updated>2022-04-25T17:22:54Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-04-25T16:38:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ce877e442124cb61a38ffe4ab7b3f29ff1b3541f'/>
<id>urn:sha1:ce877e442124cb61a38ffe4ab7b3f29ff1b3541f</id>
<content type='text'>
And add an imprecation in define_list_config_builder's doc comment do
do so in future for other invocations of the macro.

Add add the missing full stops.
</content>
</entry>
<entry>
<title>Use better syntax for doc comment attribute</title>
<updated>2022-04-25T16:05:30Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-04-25T15:49:42Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=dca4f3ede107ec343e733f580723140437cc8c7f'/>
<id>urn:sha1:dca4f3ede107ec343e733f580723140437cc8c7f</id>
<content type='text'>
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/471#note_2798020
</content>
</entry>
<entry>
<title>Introduce define_list_config_builder macro</title>
<updated>2022-04-25T11:41:00Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-04-25T10:39:24Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0036b916622e9371e3788f1ac34e30efc2ba7da4'/>
<id>urn:sha1:0036b916622e9371e3788f1ac34e30efc2ba7da4</id>
<content type='text'>
This replaces two almost-identical sets of structs and impls.  More
are on the way, as per
  https://gitlab.torproject.org/tpo/core/arti/-/issues/447
</content>
</entry>
<entry>
<title>logging: Drop a pointless .within() call</title>
<updated>2022-04-25T11:38:36Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-04-25T10:29:33Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=62aa0719989a96722cde7d34c4d103220881569f'/>
<id>urn:sha1:62aa0719989a96722cde7d34c4d103220881569f</id>
<content type='text'>
Since "logfiles: Introduce LogfileListConfigBuilder", this code is in
LogfileListConfigBuilder::build(), which is called by derive_builder's
generated LoggingConfig::build(), and which will add a file context
itself due to the `sub_builder` feature.

So this is otiose.  And, we are about to replace this whole thing with
macro_rules-generated code (which won't do this).
</content>
</entry>
<entry>
<title>logfiles: Introduce LogfileListConfigBuilder</title>
<updated>2022-04-22T16:48:03Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-04-22T16:39:42Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=79decd4ac8194fe3e14d7b755201dac13f50050f'/>
<id>urn:sha1:79decd4ac8194fe3e14d7b755201dac13f50050f</id>
<content type='text'>
In
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/462#note_2797697
we decided not to do this.

However, having looked again at the way the FallbackList works, I
think there is a lot of value in making these two things (and anything
else like them[1]) as similar as possible.

[1] At least PreemptiveCircuitConfig.initial_predicted_ports and
NetworkConfig.authorities need the same treatment, and perhaps also
GuardUsage.restrictions (although there is no
GuardRestrictionBuilder).

In the irc discussion I imagined `LogfilesConfigBuilder` as opposed to
`LogfileConfigBuilder` (differing only in the `s`) which would be bad,
but we can use `List` instead.

We do *not* need to abstract away the validated version of the config.
Providing a type alias helps the derive_builder sub_builder DTRT
without needing special overrides.

I have split this commit so that we can drop it, if we conclude it's
not wanted.
</content>
</entry>
</feed>
