/// Writes the changelog using whatever options have been specified thus far.
///
/// # Example
///
/// ```no_run
/// # use clog::Clog;
/// let mut clog = Clog::new().unwrap_or_else(|e| {
///     e.exit();
/// });
///
/// clog.write_changelog();
/// ```
Writes the changelog using whatever options have been specified thus far.
Writes the changelog using whatever options have been specified thus far .
pub fn write_changelog(&self) -> WriterResult {
        debugln!("Writing changelog with preset options");
        if let Some(ref cl) = self.outfile {
            debugln!("outfile set to: {:?}", cl);
            self.write_changelog_to(cl)
        } else if let Some(ref cl) = self.infile {
            debugln!("outfile not set but infile set to: {:?}", cl);
            self.write_changelog_from(cl)
        } else {
            debugln!("outfile and infile not set using stdout");
            let out = stdout();
            let mut out_buf = BufWriter::new(out.lock());
            match self.out_format {
                ChangelogFormat::Markdown => {
                    let mut writer = MarkdownWriter::new(&mut out_buf);
                    self.write_changelog_with(&mut writer)
                }
                ChangelogFormat::Json => {
                    let mut writer = JsonWriter::new(&mut out_buf);
                    self.write_changelog_with(&mut writer)
                }
            }
        }
    }
pub fn write_changelog ( & self ) -> WriterResult { debugln ! ( " " ) ; if let Some ( ref cl ) = self . outfile { debugln ! ( " " cl ) ; self . write_changelog_to ( cl ) } else if let Some ( ref cl ) = self . infile { debugln ! ( " " cl ) ; self . write_changelog_from ( cl ) } else { debugln ! ( " " ) ; let out = stdout ( ) ; let mut out_buf = BufWriter :: new ( out . lock ( ) ) ; match self . out_format { ChangelogFormat :: Markdown => { let mut writer = MarkdownWriter :: new ( & mut out_buf ) ; self . write_changelog_with ( & mut writer ) } ChangelogFormat :: Json => { let mut writer = JsonWriter :: new ( & mut out_buf ) ; self . write_changelog_with ( & mut writer ) } } } }
Writes the changelog using whatever options have been specified thus far.
Writes the changelog using whatever options have been specified thus far .
&self
example
None
use clog::clog;
None