Struct rhit::args::Args

source ·
pub struct Args {
Show 17 fields pub version: bool, pub color: BoolArg, pub key: Key, pub length: usize, pub fields: Fields, pub changes: bool, pub date: Option<String>, pub ip: Option<String>, pub method: Option<String>, pub path: Option<String>, pub referer: Option<String>, pub status: Option<String>, pub all: bool, pub no_name_check: bool, pub lines: bool, pub silent_load: bool, pub files: Vec<PathBuf>,
}
Expand description

Rhit gives you a report of the hits found in your nginx logs.

Complete documentation at https://dystroy.org/rhit

Fields§

§version: bool

print the version

§color: BoolArg

color and style: ‘yes’, ‘no’ or ‘auto’ (auto should be good in most cases)

§key: Key

key used in sorting and histogram, either ‘hits’ (default) or ‘bytes’

§length: usize

detail level, from 0 to 6 (default 1), impacts the lengths of tables

§fields: Fields

comma separated list of hit fields to display. Use -f a to get all fields. Use -f +i to add ip. Available fields: date,method,status,ip,ref,path. Default fields: date,status,ref,path.

§changes: bool

add tables with more popular and less popular entries (ip, referers or paths)

§date: Option<String>

filter the dates, on a precise day or in an inclusive range (eg: -r 12/24 or -r '2021/12/24-2022/01/21')

§ip: Option<String>

ip address to filter by. May be negated with a !

§method: Option<String>

http method to filter by. Make it negative with a !. (eg: -m PUT or -m !DELETE or -m none or -m other)

§path: Option<String>

filter the paths with a pattern (eg: -p broot or -p '^/\d+' or -p 'miaou | blog')

§referer: Option<String>

filter the referers with a pattern

§status: Option<String>

comma separated list of statuses or status ranges. (eg: -s 514 or -s 4xx,5xx, or -s 310-340,400-450 or -s 5xx,!502)

§all: bool

show all paths, including resources

§no_name_check: bool

tries to open all files, whatever their names

§lines: bool

print the original log lines, filtered and sorted

§silent_load: bool

don’t print anything during load, no progress bar or file list

§files: Vec<PathBuf>

the log file or folder to analyze

Trait Implementations§

source§

impl Debug for Args

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Args

source§

fn default() -> Args

Returns the “default value” for a type. Read more
source§

impl FromArgs for Args

source§

fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>

Construct the type from an input set of arguments. Read more
source§

fn redact_arg_values( __cmd_name: &[&str], __args: &[&str] ) -> Result<Vec<String>, EarlyExit>

Get a String with just the argument names, e.g., options, flags, subcommands, etc, but without the values of the options and arguments. This can be useful as a means to capture anonymous usage statistics without revealing the content entered by the end user. Read more
source§

impl TopLevelCommand for Args

Auto Trait Implementations§

§

impl RefUnwindSafe for Args

§

impl Send for Args

§

impl Sync for Args

§

impl Unpin for Args

§

impl UnwindSafe for Args

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Fun for T

source§

fn fun<F, D>(self, f: F) -> Twhere F: FnMut(&T) -> D,

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.